Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: while(<>) { ... } considered harmful

by IlyaM (Parson)
on Sep 09, 2002 at 09:42 UTC ( #196200=note: print w/ replies, xml ) Need Help??


in reply to Re: while(<>) { ... } considered harmful
in thread while(<>) { ... } considered harmful

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.

--
Ilya Martynov (http://martynov.org/)


Comment on Re: Re: while(<>) { ... } considered harmful
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://196200]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2014-12-20 12:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls