in reply to Re: Print hash keys and lookup the keys for values in another filr
in thread Print hash keys and lookup the keys for values in another filr
I didn't comment on this section before since the program seems to have had very little effort put into it. The last if !line; part will never do anything even if corrected since $line is only declared and assigned a value if the regex matches.
my $line = $_ if /\bWood\b/; chomp ($line); last if !line;
Perhaps something like last if /^\s*$/ placed ahead of the my $line = $_ ... would work.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Print hash keys and lookup ...
by haukex (Archbishop) on Feb 02, 2017 at 12:43 UTC | |
by Lotus1 (Vicar) on Feb 02, 2017 at 14:42 UTC | |
|
Re^3: Print hash keys and lookup ... (updated)
by haukex (Archbishop) on Feb 01, 2017 at 17:00 UTC |