On Feb 1, [EMAIL PROTECTED] said:
>Is there a way for a subroutine to tell when it got passed a FILEHANDLE?
You could test to see if its ref() returns "GLOB" or "IO::File" or
"IO::Handle", etc., but I think it's a nifty idea to do:
if (defined fileno($arg)) {
# it's an open filehandle
}
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
[ I'm looking for programming work. If you like my work, let me know. ]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>