Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: When is $_ local and when is it not?

by dragonchild (Archbishop)
on Jul 13, 2001 at 18:36 UTC ( #96412=note: print w/replies, xml ) Need Help??


in reply to When is $_ local and when is it not?

I know that I've started to do something like:

sub foo { local $_; my ($var1, $var2) = @_; ... }

in all my personal "production-level" code. (I'm an avid user of $_.) While this can result in a slight performance hit, I change my personal code around enough that have that template just makes me feel safer about using $_.

Just a suggestion. :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://96412]
help
Chatterbox?
[pryrt]: (*: for systems where $Config{nvsize}==8 )
[pryrt]: Thus, that's "enough precision" to tell the difference between 1.0 and 1.0+1ULP
[pryrt]: But in what circumstance does your problem arise? When, in Perl, does the integer 1 not work identically to the floating-point NV 1.0000000000000000 e0?

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (16)
As of 2017-05-24 19:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?