On 27/2/02 17:33, "Steven M. Klass" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> ok here is the fundamental code
>
> print "\n\n**Summary**\n";
> foreach my $key (keys %runset){
> printf ( "%-20s %-20s\n",$key, $runset{$key});
> }
>
> Now I want to sort this hash for example
> print "\n\n**Summary**\n";
> foreach my $key (keys %runset){
> print "Name $runset{foo}"
> # .. other specific keys
> printf ( "%-20s %-20s\n",$key, $runset{$key});
> }
>
> The question is how can I sort the remaining keys that I haven't already
> printed before.
>
> Basically I want to format this so certain keys get printed in a certain
> order, but there may be some remaining keys that I want printed that I really
> don't care about. (a "catch-all" if you will)
>
> Thanks
print "\n\n**Summary**\n";
foreach my $key (keys %runset){
print "Name $runset{foo}"
# .. other specific keys
foreach $key (sort keys %runset) { ## sort the remaining in ASCII order.
printf ( "%-20s %-20s\n",$key, $runset{$key});
}
Something like that?
--
T.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]