in reply to while(<>) { ... } considered harmful
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".
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: while(<>) { ... } considered harmful
by IlyaM (Parson) on Sep 08, 2002 at 19:48 UTC |
In Section
Meditations