in reply to Re^2: simple pattern match ?
in thread simple pattern match ?

This is a quick, nasty way of matching a range without spending a lot of effort on crafting a clever regular expression.

@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