Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Idiomatic Perl?

by Anonymous Monk
on Mar 20, 2018 at 19:08 UTC ( [id://1211364]=note: print w/replies, xml ) Need Help??


in reply to Re: Idiomatic Perl?
in thread Idiomatic Perl?

If you're gonna use globals you're supposed to localize

Replies are listed 'Best First'.
Re^3: Idiomatic Perl?
by AppleFritter (Vicar) on Mar 23, 2018 at 09:16 UTC
    Can you properly localize $_? I vaguely recall Rafael Garcia-Suarez mentioning something about "having 'local $_' not working as intended", but never investigated what that means.
Re^3: Idiomatic Perl?
by mxb (Pilgrim) on Mar 20, 2018 at 19:51 UTC

    Huh, I didn’t know that! I’ve only ever assigned to $_ in throw away scripts and one liners. Thanks for that, I learned something new.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-25 19:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found