cleaning up warnings about masked vars

This commit is contained in:
Dan Buch 2011-01-05 21:43:59 -05:00
parent d690d1b0bd
commit 3af25d3369

View File

@ -11,25 +11,25 @@ my @lines = <$fh>;
print Data::Dumper->Dump([\@lines], [qw(lines)]); print Data::Dumper->Dump([\@lines], [qw(lines)]);
open(my $fh, '<', 'foo.txt'); open(my $fh2, '<', 'foo.txt');
while(my $line = <$fh>) { while(my $line = <$fh2>) {
print $line; print $line;
} }
my $fh = IO::File->new('foo.txt', 'r'); my $fh3 = IO::File->new('foo.txt', 'r');
while(my $line = $fh->getline()) { while(my $line = $fh3->getline()) {
print $line; print $line;
} }
my $fh = IO::File->new('foo.txt', 'r'); my $fh4 = IO::File->new('foo.txt', 'r');
my @lines = $fh->getlines(); my @lines4 = $fh4->getlines();
print @lines; print @lines4;
print Data::Dumper->Dump([\@lines], [qw(lines)]); print Data::Dumper->Dump([\@lines4], [qw(lines)]);
1; 1;