If you have a single filename then,
my ($match)=$file=~/(\d{4})\d{4}\.txt/;
If you have multiple filenames and you want to construct array of the results then,
my @a = map {/(\d{4})\d{4}\.txt/} @filenamearray;
Regards,
Murugesan Kandasamy
use perl for(;;);
In reply to Re: grep question
by murugu
in thread grep question
by darrengan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |