Ack, you're right (of course) ... for some reason I always think of $_ as a global.
Still I find even the goto version nicer and the obvious change for the sub version turns it into the form you posted, but with the do as a sub (which is, again, more readable IMO).
In reply to Re: •Re: Re: •Re: Seeking an idiom for localizing $/
by nevyn
in thread Seeking an idiom for localizing $/
by perlcgi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |