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
earlier, and should have been freed, and in fact, probably was freed.
This could indicate that SvREFCNT_dec() was called too many times, or
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.
####
foreach my $key ( @{[%hash]} ) {
# print "$key: @{[%hash]}\n";
delete $hash{$key};
}
####
foreach my $key (my @ary = %hash) {
# print "$key: @ary\n";
delete $hash{$key};
}