Help for this page

Select Code to Download


  1. or download this
    Attempt to free unreferenced scalar at scratchpad2.pl line 5 (#2):
    (W internal) Perl went to decrement the reference count of a scalar to
    see if it would go to 0, and discovered that it had already gone to 0
    ...
    that SvREFCNT_inc() was called too few times, or that the SV was
    mortalized when it shouldn't have been, or that memory has been
    corrupted.
    
  2. or download this
    foreach my $key ( @{[%hash]} ) {
      # print "$key: @{[%hash]}\n";
      delete $hash{$key};
    }
    
  3. or download this
    foreach my $key (my @ary = %hash) {
      # print "$key: @ary\n";
      delete $hash{$key};
    }