waxmop has asked for the wisdom of the Perl Monks concerning the following question:

I need to load in data from a file that looks sort of like this:
AAA.1, AAA.2, AAA.3, AAA.4, AAA.5
I want to grab every AAA.number and push it into an array like so:
my @list; while (<INFILE>) { m/(AAA.\d)/; push @list, $1; }
But I don't know how to deal with the fact that there could be 1 or 2 AAA codes on each line. Is there a way to write a regular expression that will match a pattern and return a $1 variable over and over again?