Data::Dumper works for me. You don't need to provide a list of the hash 
keys.

#!/usr/bin/perl -w

use strict;
use Data::Dumper;

my %hash;

$hash{one}=1;
$hash{two}{one}=2.1;
$hash{three}{one}{one}=3.11;

print Dumper(%hash);

#######################

$VAR1 = 'one';
$VAR2 = 1;
$VAR3 = 'three';
$VAR4 = {
          'one' => {
                     'one' => '3.11'
                   }
        };
$VAR5 = 'two';
$VAR6 = {
          'one' => '2.1'
        };


#######################

Apr 3, 2003 at 1:53pm from Eric Walker:

EW> I don't know if I am reading the data dumper help code right but it seems you
EW> have to provide a list of the hash keys to get the values.  I need a way to
EW> just print out all keys and values no matter how many levels of hierachy there
EW> may be in the hash.

-- 
http://emerson.wss.yale.edu/perl
Pete Emerson
WSS AM&T Yale University


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to