Eric Walker wrote:
> Sorry for the ignorance but I think I am able to pull the first layer of
> the hash but the values that are also hashes or arrays I get memory
> pointers out .
Not exactly. Those are references. The difference in some ways is suble, but
the upshot is that you shold never t
Eric Walker wrote:
Sorry for the ignorance but I think I am able to pull the first layer of
the hash but the values that are also hashes or arrays I get memory
pointers out .
For example:
TEMP: 2.0
TEMP5: ARRAY(0xdb660)
TEMP6: HASH(0xa2058)
Any suggestions on how to access the array and or hash
print $HASH{$KEY}
>
> HTH,
> Yargo!
>
> Original Message:
> -
> From: R. Joseph Newton [EMAIL PROTECTED]
> Date: Thu, 03 Apr 2003 18:04:43 -0800
> To: [EMAIL PROTECTED], [EMAIL PROTECTED]
> Subject: Re: HASH PRINTING
>
> Eric Walker wrote:
>
&
EMAIL PROTECTED]
Date: Thu, 03 Apr 2003 18:04:43 -0800
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: HASH PRINTING
Eric Walker wrote:
> I have a HASH with a mixture of single, double and triple layers.
> exampl hash of hash of array's etc
> I try to dump and see values of
Eric Walker wrote:
> I have a HASH with a mixture of single, double and triple layers.
> exampl hash of hash of array's etc
> I try to dump and see values of the entire db but I get pointers and
> memory addresses. Below is my code Please help.
>
> foreach my $item (keys %hData){
> print ("$
Jenda Krynicky wrote:
> From: Eric Walker <[EMAIL PROTECTED]>
> > David Olbersen wrote:
> > > > From: Eric Walker [mailto:[EMAIL PROTECTED]
> > > >
> > > > I have a HASH with a mixture of single, double and triple layers.
> > > > exampl hash of hash of array's etc I try to dump and see
> > > >
From: Eric Walker <[EMAIL PROTECTED]>
> David Olbersen wrote:
> > > From: Eric Walker [mailto:[EMAIL PROTECTED]
> > >
> > > I have a HASH with a mixture of single, double and triple layers.
> > > exampl hash of hash of array's etc I try to dump and see
> > > values of the entire db but I get po
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';
$V
David Olbersen wrote:
> Eric,
>
> Use Data::Dumper, it'll do this very well if it's just for debugging purposes.
>
> Check out the documentation on cpan.org:
>
> http://search.cpan.org/author/JHI/perl-5.8.0/ext/Data/Dumper/Dumper.pm
>
> or `man Data::Dumper` if you're on a UNIX machine.
>
> --
Eric,
Use Data::Dumper, it'll do this very well if it's just for debugging purposes.
Check out the documentation on cpan.org:
http://search.cpan.org/author/JHI/perl-5.8.0/ext/Data/Dumper/Dumper.pm
or `man Data::Dumper` if you're on a UNIX machine.
--
David Olbersen
iGu
10 matches
Mail list logo