Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re(4) Whether to use local()

by dmmiller2k (Chaplain)
on Mar 16, 2002 at 04:25 UTC ( #152151=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use vars qw( $x );      # a package global
    
    ...
    # to 'inner' and in both cases, the value of $x is restored when the
    # block exits, except in the 'local' case, it is not necessary to
    # explicitly restore $x
    
  2. or download this
    # need to 'slurp' in an entire file
    {
    ...
      # (read the file, etc.)
    }
    # $/ is now restored to whatever it was before
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2023-12-02 12:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (16 votes). Check out past polls.

    Notices?