Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: typeglobs and filehandles

by Dominus (Parson)
on Dec 20, 2000 at 23:15 UTC ( #47633=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      sub foo {
        my $z = 4;
        return $z;
      }
    
  2. or download this
      my $x;
      { my $var = 4;
    ...
      }
      # 'var' is now out of scope.
      print $$x;  # but this still prints "4".
    
  3. or download this
      sub new_filehandle {
        local *FH;
    ...
      }
    
      $x = new_filehandle();
    
  4. or download this
      sub new_filehandle {
        local *FH;
    ...
      }
    
      $x = new_filehandle();
    
  5. or download this
      sub new_filehandle {
        local *FH;     # return of *FH is implied
      }
    
      $x = new_filehandle();
    
  6. or download this
      $x = do { local *FH;   };  # return of *FH is implied
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2014-09-20 03:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (152 votes), past polls