Help for this page

Select Code to Download


  1. or download this
    Note that if you take a copy of a scalar with a weakened reference, th
    +e copy will be a strong reference.
    
        my $var;
        my $foo = \$var;
        weaken($foo);                       # Make $foo a weak reference
        my $bar = $foo;                     # $bar is now a strong referen
    +ce
    
  2. or download this
    /usr/bin/perl
    use strict;
    ...
            weaken($$arg = $foo);
            return;
    }
    
  3. or download this
    returnweak isweak - no - 'HASH(0x606df0)'
    weakenbyref isweak - yes - 'HASH(0x606df0)'