http://www.perlmonks.org?node_id=744313

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

Hi monks,
I have a line of code to match a line with some regular expression.
$str =~ s/age ([0-9]+) name ([a-z]+)/$&/; <br>
By using the above,I can get the matched values by printing $1 and $2 variables. Will i get matched result as an array?

Note : Am not interested to explicitly copy the matched variables into an array.
Thanks.