in reply to Nested foreach
Put your ignore words in a hash, like so:
my %ignores = map { $_ => 1 } qw/bar foo baz quux/;
Then, as you read through the file break your $lines into $word's and:
next if $ignores{$word};
Hashes are fast and convenient. Use them.
--
perl: code of the samurai
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Nested foreach
by dragonchild (Archbishop) on Apr 25, 2003 at 16:54 UTC |