Help for this page

Select Code to Download


  1. or download this
    my $val = func();
    print "Reference to a HASH!\n" if ref($val) eq "HASH";
    print "Reference to a ARRAY!\n" if ref($val) eq "ARRAY";
    print "Reference to a SCALAR!\n" if ref($val) eq "SCALAR";
    print "A non-reference SCALAR!\n" if not ref($val);