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