You might be looking for ref()
> perl -e '$u='hallo'; print ref($u),"\n"; ' > perl -e '$u=\'hallo'; print ref($u),"\n"; ' SCALAR
UPDATE: Misread your question. You are looking for the symbol table hashes
> perl -e ' if (exists $main::{"u"}) { print "yes\n"; } ' > perl -e '$u='hallo'; if (exists $main::{"u"}) { print "yes\n"; } ' yes
In reply to Re: flavors of "defined"
by jethro
in thread flavors of "defined"
by Wiggins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |