in reply to glob and regex

Just look in the directory and apply grep e.g
opendir(my $dir, 'your_directory_here') or die("ack: $!"); my @files = grep /[A-Za-z]{2}_\w{2,5}/, readdir $dir; closedir $dir;
See. opendir and readdir for more info.
HTH

_________
broquaint

Replies are listed 'Best First'.
Re: Re: glob and regex
by hardburn (Abbot) on Oct 09, 2003 at 14:50 UTC

    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