Just another Perl shrine | |
PerlMonks |
Re: search position is getting reset after 'local' (Workaround)by ikegami (Patriarch) |
on Jun 12, 2006 at 22:27 UTC ( [id://554915]=note: print w/replies, xml ) | Need Help?? |
There is a workaround:
The catch: @x, %x, &x, etc will get localized too. In other words, if you use local *_ to protect the pos of $_, you will lose access to the current @_ for the remainder of block.
In Section
Seekers of Perl Wisdom
|
|