@range = (0 .. 59); { local $" = '|'; $rxMatchIt = qr{(@range)}; }
You end up with a regular expression which says match 0 or 1 or ... 59. This falls over if there are leading zeros but could easily be adapted to cope. I like nifty regular expressions but sometimes quick and dirty gets the job done.
Cheers,
JohnGG
In reply to Re^3: simple pattern match ?
by johngg
in thread simple pattern match ?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |