Perl Ref is an Array

Saturday, March 4, 2006
if (ref $var eq 'ARRAY') {
    print "It's an ARRAY ref\n";
}
elsif (ref $var eq 'HASH') {
    print "It's a HASH ref\n";
}