in reply to Question on pattern matching
my %digits = map{ '0'x(2-length($_)).$_, 1 }0..99; #now keys in %digits are from 00,01 ... to 99 if( exists $digits{$my_dat} ){ ... } [download]