more useful options | |
PerlMonks |
Re: Re: while(<>) { ... } considered harmfulby IlyaM (Parson) |
on Sep 09, 2002 at 09:42 UTC ( [id://196200]=note: print w/replies, xml ) | Need Help?? |
I disagree with saying that map is considered harmful. As I noted in other reply in this thread its behaviour is consistent with other Perl operators: for/foreach and grep. In my opinion it is while(<>)'s magic is wrong. It should localize $_ so it doesn't affect outer scope.
--
In Section
Meditations
|
|