in reply to Re: Re: Re: Re: Hash Problems
in thread Hash Problems

I don't think that you are gaining anything by setting up these initial values for the hashes. You should be able to just comment out those three assignments and have everything work.

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Hash Problems
by wstarrs (Acolyte) on May 17, 2001 at 00:37 UTC
    Yeah, I did that and it seems to work fine, one final question on this subject, the data output looks like this:
    $VAR5 = 'Test2'; $VAR6 = { 'ShowHome' => 'Home', 'RightNavExpirationDate' => 20010520, 'RightNavLaunchDate' => 20010510, 'ShowPersonal' => 'Personal', 'SmallGraphic' => '/templatedata/components/msn.gif' };
    Just for one instance, is this telling me that 'Test2' is the key and {the whole list from var6} are the values? That is how I am interpreting it...
      Yep, that's right. What's happening is that Dumper doesn't know you're passing it a hash; it just gets a flattened list of values, and prints them one after another.

      I probably should have suggested this instead:

      use Data::Dumper; print Dumper \%home_dcr_files; # ref to hash, for nicer formatting
        Thanks a ton fellas...
      You had Dumper called wrong. Because it's often so one can read it nonetheless. Call it "Dumper \%hash" ("\" is important) and you will see what it really means:)