whatluo has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I want print a hash orderly as I want, but the following code
gave me unorder output, Any sugguestion on this , I'm a
newbie here,so bear with me :)
--
my %grp_advise = ( "grp1" => "normal,random,sequential", "grp2" => "willneed,dontneed,free", "grp3" => "access_lwp,access_many,access_default" ); foreach my $grp (keys %grp_advise) { my $advise_value = $grp_advise{$grp}; print "$grp ===> $advise_value\n"; }
---output---
grp3 ===> access_lwp,access_many,access_default grp1 ===> normal,random,sequential grp2 ===> willneed,dontneed,free
20050525 Content restored by Corion
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: hash unorderly output
by Nevtlathiel (Friar) on May 25, 2005 at 09:54 UTC | |
|
Re: hash unorderly output
by muntfish (Chaplain) on May 25, 2005 at 09:57 UTC | |
by Nevtlathiel (Friar) on May 25, 2005 at 10:23 UTC | |
by jdporter (Paladin) on May 25, 2005 at 11:14 UTC | |
by Limbic~Region (Chancellor) on May 25, 2005 at 13:03 UTC | |
|
Re: hash unorderly output
by reasonablekeith (Deacon) on May 25, 2005 at 10:27 UTC | |
|
Re: hash unorderly output
by Hena (Friar) on May 25, 2005 at 09:58 UTC | |
|
Re: hash unorderly output
by davidrw (Prior) on May 25, 2005 at 15:17 UTC | |
|
Re: hash unorderly output
by chanakya (Friar) on May 26, 2005 at 06:25 UTC | |
|
Re: hash unorderly output
by Amar (Sexton) on May 26, 2005 at 04:42 UTC |