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
In reply to Re: Array Comparison
by Not_a_Number
in thread Array Comparison
by mcogan1966
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |