Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Passing filehandles to subs.

by Chady (Priest)
on May 05, 2001 at 12:25 UTC ( #78204=note: print w/replies, xml ) Need Help??


in reply to Passing filehandles to subs.

In the first example you're 'passing a reference to the corresponding typeglob. and this is the best way to pass filehandles to or from subroutines, since it has the optical effect of removing the ambiguity of the typeglob'

As for the prototyping question: 'a backslash quoted character signifies that the argument absolutely must start with that character - for example, \@ would require that the function call specify a list as the first argument'.. but then you are specifying a typeglob which is in fact everything.. so you're requiring 'everything' to be the first argument, which is pointless...

the quoted lines are from a book... and I hope it helps a bit.

Update: fixed some typos


He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.

Chady | http://chady.net/

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2021-10-17 06:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (71 votes). Check out past polls.

    Notices?