#check for 257 theough 313 @aon = ("100","134","259","290","310","314","330"); foreach $n (@aon){ print "$n\n" if ($n =~ /[2-3][1|5-9][0-3|7-9]/); }