Help for this page

Select Code to Download


  1. or download this
    use Devel::Peek qw(SvREFCNT);
    
    ...
    
    my $aref = return_array();
    print "Function returned a reference. Refcount:", Devel::Peek::SvREFCN
    +T(@$aref), "\n";
    
  2. or download this
    @array declared. Refcount: 1
    A reference has been taken to @array. Refcount: 2
    Function returned a reference. Refcount:1