http://qs321.pair.com?node_id=328506


in reply to Re: Re: Clean out da hash...
in thread Clean out da hash...

Are you absolutely certain those subs are using the same %hash as is declared there? (Try sticking some print \%hash; statements in the foreach loop and at the beginning of the *_hash subs.) Are the subs in the same source? Do you have another my %hash statement? You aren't tweaking the readonly flag on %hash, are you?

Replies are listed 'Best First'.
Re: Re: Re: Re: Clean out da hash...
by GaijinPunch (Pilgrim) on Feb 12, 2004 at 09:23 UTC
    I'm very sure there's no other hash references in there. I double checked that. I don't know anything about read only flags, so I suspect it's not that.

    I'm going over everything again, and haev even sucked a colleague in, but I've stumped him as well.

    Grrrrr..
      After you have called clean_hash, why don't you check its contents with
      use Data::Dumper; ... clean_hash(); print STDERR Dumper(\%hash); ...

      +++++++++++++++++
      #!/usr/bin/perl
      use warnings;use strict;use brain;

      If you start stripping down the code to be short enough to show (but still demonstrably broken), you'll probably stumble across the answer.