in reply to Re: glob and regex
in thread glob and regex
The grep should probably check if it's a file, not a directory:
my @files = grep { -f && /[A-Za-z]{2}_\w{2,5}/ }, readdir $dir;
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
Note: All code is untested, unless otherwise stated
|
|---|