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

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...

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Re: Hash Problems
by chipmunk (Parson) on May 17, 2001 at 00:42 UTC
    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...
Re: Re: Re: Re: Re: Re: Re: Hash Problems
by Anonymous Monk on May 17, 2001 at 00:44 UTC
    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:)