Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Re: opening a file destroys nulling entries in a list?!?!

by bobn (Chaplain)
on Aug 07, 2003 at 03:45 UTC ( #281736=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: opening a file destroys nulling entries in a list?!?!
in thread opening a file destroys nulling entries in a list?!?!

Nevermend. I think I get it - someone else posted that while(<>){} is the same as while($_=<>){} - it does an assignment to $_ and that's what does the damage.

Somehwere, I think I remember someone (Tom Christiansen, I think) saying to always localize $_ in subroutines. Now I know why.

--Bob Niederman, http://bob-n.com


Comment on Re: Re: Re: opening a file destroys nulling entries in a list?!?!
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2014-12-19 10:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (78 votes), past polls