Perl-Sensitive Sunglasses | |
PerlMonks |
Re^2: How can I access the number of repititions in a regex?by amarquis (Curate) |
on Mar 11, 2008 at 18:42 UTC ( [id://673582]=note: print w/replies, xml ) | Need Help?? |
Would you mind explaining how this works? I understand that the empty () imposes list context on the right, making the match return the number of matches. Then you are left with the assignment of a scalar to an empty list, which is in turn assigned to $count. I guess I'm just not sure how the "5" propagates over the empty list in the middle to land in the $count variable. Sorry if I'm being dense.
In Section
Seekers of Perl Wisdom
|
|