![]() |
|
Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: assigning regex matches to variablesby lidden (Curate) |
on May 28, 2011 at 20:10 UTC ( #907161=note: print w/replies, xml ) | Need Help?? |
Change my $digits = $string2 =~ /(\d)+/; to my ($digits) = $string2 =~ /(\d)+/; and it will work. The parens changes the assingment from scalar to list context.
In Section
Seekers of Perl Wisdom
|
|