Is there a way to determine whether a variable ($x) is a reference, and if so, what type of thing it refers to?
For example, I want to do something like:
if ( is_not_a_reference($x) ) { print $x; } elsif ( is_a_hash_ref($x) ) { process_hash( %$x ); } else { . . . }
Originally posted as a Categorized Question.
In reply to How do I determine the type of a reference? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |