Help for this page

Select Code to Download


  1. or download this
    my $ar = [];
    push @{$ar}, $ar;
    # $ar can only be destroyed manually.
    
  2. or download this
    use Scalar::Util qw( weaken is_weak );
    
    ...
    if ( ! is_weak $copy ) {
        print "copy is not weak\n";
    }