in reply to exists *{$glob} ? (+)
Is this what you mean?
*TGlob; # Create a typeglob named 'TGlob'. print "It's there!\n" if exists $::{'TGlob'}; __OUTPUT__ It's there!
Update: Just to clarify.... Typeglobs are the containers for Perl's package global variables. Really they're symbol entries in a particular package's symbol table hash. Package main's symbol table is accessed via %::, or %main::. I'm just checking the global symbol table to see if an entry exists for a particular symbol. If it exists, you've got a typeglob.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: exists *{$glob} ? (+)
by broquaint (Abbot) on Sep 09, 2004 at 08:20 UTC | |
by ysth (Canon) on Sep 09, 2004 at 15:43 UTC |