P
peterkayatwork
I want to be able to tell if a variable is a FileHandle as opposed to a
string, hash, whatever. I know perl will tell me that it's a Glob:
If I do:
----code:
my $fh=\*STDIN;
print "Have [$fh]\n";
----end of code
it tells me
Have [GLOB(0x10131870)]
Thanks, perl.
If I do an "isa" to see if I've got a glob, what else could it be
besides a FileHandle?
Better yet, is there a more elegent way to tell if I've got a
FileHandle or a String?
--Peter
string, hash, whatever. I know perl will tell me that it's a Glob:
If I do:
----code:
my $fh=\*STDIN;
print "Have [$fh]\n";
----end of code
it tells me
Have [GLOB(0x10131870)]
Thanks, perl.
If I do an "isa" to see if I've got a glob, what else could it be
besides a FileHandle?
Better yet, is there a more elegent way to tell if I've got a
FileHandle or a String?
--Peter