perldoc -f ref
Example:
open ($fl, "/tmp/1.o");
if (ref($fl) eq 'GLOB')
{ print "Is a FILEHANDLE\n"; }
else
{ print "Isn't a FILEHANDLE\n"; }
I'm not very clear if GLOB is returned only for filehandles.
bye,
George P.
On Wed, 8 Jan 2003, Beau E. Cox wrote:
> Hi -
>
> I want to determine is a variable is a file handle.
>
> How would I do this?
>
> I know how to tell if it is a ref to something,
> but I can't seem to be able to find out if it
> is a file handle.
>
> Aloha => Beau/
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]