Don't ask to ask, just ask | |
PerlMonks |
Re: Re: Stumped with $_ being modifiedby ihb (Deacon) |
on Jan 09, 2003 at 15:24 UTC ( [id://225555]=note: print w/replies, xml ) | Need Help?? |
I too am stumped... by your reply. I don't know where to begin. How can you say that he shouldn't localize? What's wrong with localizing? I even find it hard to argue with you since it all boils down to "why are you so anti localization?" and all my arguments seem so obvious that they shouldn't have to be mentioned. I just don't see it.
How far do you take this? Should you localize filehandles? Or should you use "good names" so you don't have to localize? (In perl5.6 you're saved by the open my $fh, $file syntax, but the issue is still very interesting.) If you steer away from using "local declared variables", do you also always use your own named variable in foreach loops? foreach my $foo (LIST) { ... } I just wrote a note about localization and while loops; the relevant thread is here. As you see, I have the very opposite opinion of you. So I'm very curious about what I've overlooked. Curiously, ihb
In Section
Seekers of Perl Wisdom
|
|