in reply to Question on pattern matching
To test if the string is exactly two digits, anchor beginning and end and use a quantifier,
The !~ op negates the match so that the bracketed code is executed if $my_dat is different from two digits.if ($my_dat !~ /^\d{2}$/) { # some code here }
After Compline,
Zaxo
|
|---|