in reply to exists *{$glob} ? (+)
Foo{THING} notation is convenient for this,
or if you can hardcode the name of the glob,my $glob = 'FOO'; if (defined do { no strict 'vars'; *$glob{IO}}) { # ... }
The foo{THING} is actually an IO::Handle object, a reference, so you can get by withif (defined *FOO{IO}) { # ... }
if (*FOO{IO}) { # ... }
After Compline,
Zaxo
|
|---|