XP is just a number | |
PerlMonks |
File handle as argumentby palette (Scribe) |
on Jun 03, 2005 at 06:28 UTC ( [id://463125]=perlquestion: print w/replies, xml ) | Need Help?? |
palette has asked for the wisdom of the Perl Monks concerning the following question:
Hi all
Can i send a file handle as a argument to a subroutine eg: Consider I have a file called /xxx/abc.txt open(IN,'/xx/abc.txt'); can i have this file handle (anyway it is just like a array or scalar reference :) i think that filehandle is going to be a reference if wrong please correct me) passed as argument to a subroutine. If i can pass it as an argument please mention how to implement it. Please guide me if i am wrong and explain in what way a file handle is actually internally manipulated in Perl. Thankyou
Back to
Seekers of Perl Wisdom
|
|