in reply to Array Comparison
To solve your case problem, try this:
use strict; use warnings; my @words = qw ( a ants cats cats dogs DOGS rabbits r@bbits turtles wa +rthogs ); my @exclude = qw ( ants Turtles WARTHOGS ); my %exclude = map { lc $_ => '1' } @exclude; for ( @words ) { next if /\W/ or length $_ < 4 or $exclude{lc $_}++; print "$_\n"; }
dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Array Comparison
by mcogan1966 (Monk) on Dec 23, 2003 at 20:09 UTC | |
by Not_a_Number (Prior) on Dec 23, 2003 at 20:31 UTC |