in reply to accumulating rex-exp matches in an array

You should never use a regex variable without making sure the regex matched. If a line DIDN'T contain "AAA.n", $1 would retain its value!

Anyway, you want to use the /g modifier:

while (<INFILE>) { push @list, /AAA.\d/g; # parens not needed in regex here }

_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;