in reply to accumulating rex-exp matches in an array
or if the items are always seperated by a space.while (<INFILE>) { while (s/(AAA\.\d)/xxxxx/) { push (@list, $1); } }
while (<DATA>) { push (@foo, grep /AAA\.\d/, split(/\s*,\s*/)); }
In Section
Seekers of Perl Wisdom