Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
while ($line = <MAIN_FILE1>){ chomp $line; if (exists $hash1{$entry}) { print OUTPUT1 "$filename\n"; #I do not have a next statement here #because i want to continue #checking if this entry also exists #in hash2... } if (exists $hash2{$entry}) { print OUTPUT2 "$filename\n"; next; } print OUTPUT1 "$filename\n"; next; } close(MAIN_FILE1)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: next statement logic
by QM (Parson) on Feb 20, 2006 at 17:55 UTC | |
by Anonymous Monk on Feb 20, 2006 at 18:16 UTC | |
by QM (Parson) on Feb 20, 2006 at 19:25 UTC | |
by Not_a_Number (Prior) on Feb 20, 2006 at 20:13 UTC | |
|
Re: next statement logic
by Not_a_Number (Prior) on Feb 20, 2006 at 19:12 UTC | |
|
Re: next statement logic
by izut (Chaplain) on Feb 20, 2006 at 17:54 UTC | |
|
Re: next statement logic
by pKai (Priest) on Feb 20, 2006 at 17:54 UTC |