Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: while(<>) { ... } considered harmfulby converter (Priest) |
on Sep 08, 2002 at 17:00 UTC ( [id://196050]=note: print w/replies, xml ) | Need Help?? |
The perlsub man page mentions localization of $_ in the "When to Still Use local()" section, and says:
In particular, it's important to "local"ize $_ in any routine that assigns to it. Look out for implicit assignments in "while" conditionals.With all due respect, both you and the authors of the modules you mention are ignoring the sound advice offered in the Perl documentation and should consider making the appropriate changes to make your code "play well with others".
In Section
Meditations
|
|