http://qs321.pair.com?node_id=509298


in reply to grep question

Hi darrengan,

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(;;);