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

Re: passing file handle to functions

by ioannis (Vicar)
on May 18, 2006 at 07:13 UTC ( #550174=note: print w/ replies, xml ) Need Help??

in reply to passing file handle to functions

If you pass a glob, you can pass both the filehandle and the array with one stone -- the filehandle can always be reopened:

no strict 'vars'; use Fatal qw(open); open local(*KERLIS) , $file; @KERLIS = <I>; close KERLIS; passboth( *KERLIS ); sub passboth { local *FH = shift; # print @FH; # open *FH, $file; }

Comment on Re: passing file handle to functions
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (19)
As of 2015-07-29 14:17 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (263 votes), past polls