Welcome to the Monastery | |
PerlMonks |
Re^5: 'Dynamic scoping' of capture variables ($1, $2, etc.)by moritz (Cardinal) |
on Dec 19, 2012 at 06:21 UTC ( [id://1009507]=note: print w/replies, xml ) | Need Help?? |
As per your code, your m// expression will match first digits ( 55 ) at all time as per my understanding No, because I used m/../g in scalar context, which remembers the previous match position in pos, and then always returns the next match during subsequent calls. Maybe you are more familiar with it in this idiom:
In Section
Seekers of Perl Wisdom
|
|