in reply to regex that simulates boolean logic

If a question is about Perl and the answer is not either "use a hash" or "use a module that uses a hash", the answer is probably wrong.

Populate a hash with your numbers and then test for existence, something like untested:

my @numbers = qw(123 345 456 567 890); my %hash; $hash{$_}++ for @numbers; for (1,56,123,567,8888) { if ($hash{$_}) {print "Found $_\n" } else { print "Not found $_\n"; } }

--
Regards,
Helgi Briem
helgi AT decode DOT is