in reply to How to detect a returns value gracefully

Check ref $$result instead of $result whenever ref($result) eq 'REF'.
use strict; use warnings; my $aFoo = []; my $result = \$aFoo; print 'ref $result : ' . ref($result) . "\n"; print 'ref $$result : ' . ref($$result) . "\n";

prints

ref $result : REF ref $$result : ARRAY

Best, beth

Replies are listed 'Best First'.
Re^2: How to detect a returns value gracefully
by Anonymous Monk on Feb 26, 2009 at 08:39 UTC
    You shouldn't use references until you've read perlref

      Care to explain what the issue is instead of spreading FUD?

        RatKing shouldn't use references until read perlref.