in reply to Regex problem

Are you sure you do not miss hashes?
@index = qw(1 11 23 45 22); $value = 22; #create hash from array map { $index{$_}++ } @index; #testing for existence exists($index{$value}) and print "yes it does"