If i get it right, ur structure looks like:

my $ref = {
                        key1 => [qw(v1 v2...)],
                        key2 => ...
};

one can do.

foreach my $key(keys %$ref) {
        print "$key: @{$ref->{$key}}\n";
}

-sharad

-----Original Message-----
From: Gene Mat [mailto:[EMAIL PROTECTED]
Sent: Monday, July 07, 2003 3:43 PM
To: [EMAIL PROTECTED]
Subject: Reference Hash to an array


Hi I trying out a new module. Everything is working execpt I can seem to 
list out a reference hash to an array. How can I print out the contents of 
the array?

I am able to get the all the keys of refrence hash by just using a 

foreach tag (keys %$REFHASH) {"print $tag $tag{$REFHASH}";}.

At this point, I believe I need another nested foreach loop to loop through 
array, however, I'm totally confused on how to format this properly.

Any URLs would be also be appreciated.


Thanks,
Gene Mat

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

Reply via email to