hth.if (ref $var eq 'SCALAR') { print "scalar\n"; } elsif (ref $var eq 'ARRAY') { print "array\n"; } elsif (ref $var eq 'HASH') { print "hash\n"; }
In reply to Re: scalar variable or array reference test
by punkish
in thread scalar variable or array reference test
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |