I can't find anything by searching so I've resorted to posting what's probably a very simple question.
If I pass a scalar into object method, how can I determine what type of value the scalar contains (either a basic scalar or a ref to an object hash)
The only way I know how to do this is shown in this ugly code snippet:
if ($myscalar =~ /HASH/) {print "Is a ref to an object hash\n";} else {print "Is a basic scalar\n";}
The idea of this is to pick up the HASH part of obj=HASH(0x12345678)
In reply to Determining contents type of a Scalar by valhalla418
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |