in reply to Reducing array


It would be better to store the items that you don't want in a hash. Then you could do something like this using grep:
#!/usr/bin/perl -w use strict; my @array = qw(dog cat cow horse donkey chicken); my %items = (cat => 1, donkey =>1); @array = grep {not exists $items{$_}} @array; print "@array\n"; __END__ prints: dog cow horse chicken

--
John.