This also works:
if ($my_dat eq sprintf('%02d', do { no warnings; 0+$my_dat })) { # $my_dat only contains digits. # $my_dat is exactly two characters long. ... }
In reply to Re^2: Question on pattern matching
by ikegami
in thread Question on pattern matching
by Joe_Cullity
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |