in reply to Why regular expression so hard?!

Building a regex that matches only that set of numbers isn't particularly hard, but it would be a huge regex and not very efficient. I'd consider doing it without a regex. Something like this perhaps:

my @list = qw(54 55 20 21 22 25) # simplifed greatly :) my %hash; @hash{@list} = (1) x @list; while (<FILE>) { # assuming FILE has been opened previously my @row = split(/,/); # assuming comma separator if ($hash{$row[-1]}) { # process line } }

p.s. Oh, and regexen are hard because they're so powerful :)

--
<http://www.dave.org.uk>

European Perl Conference - Sept 22/24 2000, ICA, London
<http://www.yapc.org/Europe/>