in reply to Re: glob and regex
in thread glob and regex
@files = glob $some_pattern; # Call glob as an operator.
When I first read that, I thought $some_pattern meant $some_regex. But, it doesn't. (Or, rather, it does mean $some_regex, but it means to use a regex with a different syntax than Perl's regex syntax.)
What the OP is looking for probably falls under the category of:
my @files = grep { /[A-Za-z]{2}_\w{2,5}/ } glob "??_??";
Two different regex syntaxes. *shrugs*
------
We are the carpenters and bricklayers of the Information Age.
The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
|
|---|