Syntactic Confectionery Delight | |
PerlMonks |
Re: Re: What would you do?by japhy (Canon) |
on Mar 16, 2001 at 20:45 UTC ( [id://64950]=note: print w/replies, xml ) | Need Help?? |
Not quite. The first method does not assign to the same $_ that the while loop uses. If it did, you couldn't use $_ in that for loop at all.
It's when you start doing silly and dangerous things like: that problems occur. It is a bad idea to assign to a global $_ -- where "global" means "not localized". japhy -- Perl and Regex Hacker
In Section
Seekers of Perl Wisdom
|
|