Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: A better regex

by mildside (Friar)
on Sep 24, 2003 at 01:35 UTC ( [id://293759]=note: print w/replies, xml ) Need Help??


in reply to A better regex

Your regex question has been answered, but I noticed you used:
my @files=`ls AFILE_*zip BFILE_*zip `;
Since ls is dependent on your operating system, a more general way to do this would be:

    my @files = glob('AFILE_*zip BFILE_*zip');

Cheers!

Replies are listed 'Best First'.
Re: Re: A better regex
by tstock (Curate) on Sep 24, 2003 at 03:26 UTC
    also works:
    my @files = glob( '{A,B}FILE_*zip' ); or my @files = <{A,B}FILE_*zip>;

    Tiago

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://293759]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-03-28 19:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found