Is it possible to get name of scalar in Perl or is it only for Typeglob.my $var = 10; sub print_name{ *glob = \$_[0]; print "Name of the variable ".*{glob}{NAME}."\n"; } print_name $var; Output: glob Expected output: var
In reply to To print name of a scalar by l33t
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |