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

Re: is filehandler used ?

by Tanktalus (Canon)
on Mar 01, 2006 at 17:42 UTC ( #533708=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $fh;
    open $fh, "<", "/etc/shadow" or $fh = undef;
    if ($fh) {
      # do stuff
    }
    
  2. or download this
    if (open my $fh, "<", "/etc/shadow")
    {
      # do stuff.
      close $fh;
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2019-04-25 15:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I am most likely to install a new module from CPAN if:
















    Results (127 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!