Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: local vs my

by Arien (Pilgrim)
on Sep 03, 2002 at 08:07 UTC ( #194701=note: print w/replies, xml ) Need Help??


in reply to Re: Re: local vs my
in thread local vs my

What about this?

open(my $fh, 'somefile') || die $!;

When calling open with an undefined variable for the indirect filehandle ($fh in this case), open will stick a reference to the "real" filehandle in the indirect filehandle. $fh is a lexical, what it refers to is not.

— Arien

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://194701]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2017-02-20 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (294 votes). Check out past polls.