I have a regex which I have made work but I am sure you could do better.
Basically I am reading in two types of file name and want to
grab a string which is embedded in each name type.
My code is;
my @files=`ls AFILE_*zip BFILE_*zip `;
foreach my $zipfile (@files) {
my $day = undef;
$zipfile =~ m/AFILE_(\d+)/;
$zipfile =~ m/BFILE_(\d+)/;
$day = $1;
}