Edward Wijaya wrote:
On 29 Sep 2004 14:58:00 +0100, Jose Alves de Castro
<[EMAIL PROTECTED]> wrote:
If I understood this correctly, you want to do this:
So sorry for being not clear.
I will extend just a bit.
Suppose I have:
my %HoH = (
firstkey => { A => 'blabla',
B => 'dadada',
C => 'tititi',}
secondkey => { D => 'blabla',
E => 'dadada',
F => 'tititi',}
);
and I generated that HoH with this:
$HoH{$fkey}{$alpha}=$text;
namely:
"firstkey, secondkey" from $fkey
"A, B, C, etc" from $alpha
"blabla etc" from $text
my question is how can I print output like:
firstkey
secondkey
How about:
print "$_\n" foreach( keys( %HoH ) );
or
map{ print "$_\n" } keys( %HoH );
Remember that a hash stores its keys/values in random order, so you will get
your keys in random order.
given the construction variables as mention before.
--
Flemming Greve Skovengaard The prophecy of the holy Norns
a.k.a Greven, TuxPower A tale of death and doom
<[EMAIL PROTECTED]> Odin saw the final sign
4112.38 BogoMIPS The end is coming soon
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>