in reply to Re: Best way to get all of the matches?
in thread Best way to get all of the matches?

print provides list context so the array is not required:

... print $file =~ /($regexp)/g;

Prints:

match alphabets not numbers

DWIM is Perl's answer to Gödel