in reply to big job, starting with little script
Your problem is that you slurp in the file with "my @lines = <FILE>;" This means that it will never enter the while loop (<FILE> will return undef). Simply take that line out. Also chomp works on $_ but you have $line = <FILE>. The following should work:
while (<FILE>) { chomp; print "$_ $map{$_}\n"; }
It looks like you have a missing "}" to close the while loop. Also you should close your FILE filehandle at the end of the program. Its a good habit. Hope that helps.
|
|---|