Re: output in specified order

2001-06-22 Thread Martin van-Eerde
If the hash is going to be built in the order that you want the output you could use the following module from CPAN Tie::IxHash use Tie::IxHash tie %the_hash, "Tie::IxHash"; ... populate the hash in the required order... foreach my $key ( %the_hash ) { print $key, " ", $the_hash{ $

Re: output in specified order

2001-06-22 Thread Aaron Craig
At the risk of being over simplistic, can you just add a number_ to the front of your hash key? my $rhHash = { '4_B' => "Fourth element", '2_A' => "Second element", '1_D' => "First element", '3_F' => "Third element", }; print "$rhHash->{$_}\

RE: output in specified order

2001-06-21 Thread Yacketta, Ronald
3f", $usr / ($usr + $sys + $wt + $idl); printf ",%1.3f", $sys / ($usr + $sys + $wt + $idl); printf ",%1.3f", $wt / ($usr + $sys + $wt + $idl); printf ",%1.3f,%d\n", $idl / ($usr + $sys + $wt + $idl), $avg; } yeah yeah yeah... I'm a newb so sue me! > -Ori

Re: output in specified order

2001-06-21 Thread Jos I. Boumans
n" <[EMAIL PROTECTED]> To: "Yacketta, Ronald" <[EMAIL PROTECTED]> Cc: "Beginners (E-mail)" <[EMAIL PROTECTED]> Sent: Thursday, June 21, 2001 9:04 PM Subject: Re: output in specified order > On Jun 21, Yacketta, Ronald said: > > >I have a th

Re: output in specified order

2001-06-21 Thread Jeff 'japhy' Pinyan
On Jun 21, Yacketta, Ronald said: >I have a the following hash that _MUST_ be outputed in a specified order >every time. You see, that's an ugly combination. You might find a pseudohash useful, but they're kinda ugly. Perhaps you want the Tie::IxHash module. -- Jeff "japhy" Pinyan [EMAI

output in specified order

2001-06-21 Thread Yacketta, Ronald
Folks, I have a the following hash that _MUST_ be outputed in a specified order every time. hash: my %lookFor = ( "ORA-"=> "ORACLE errors (various Oracle errors)", "Fault 2-001" => "Host/server down or unresponsive",