>> 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? Answering my own post.. After reading this, I realized that you where probably talking about sorting the specific keys. Since I'm not really that advanced, it gets bloated fast. My $counter = "0": print "\n\n**Summary**\n"; foreach my $key (keys %runset){ my $array[$counter] = $runset{foo}; ## assign value to array $counter++; } ## end first foreach. foreach $key (keys %runset) { @array[$counter] = $runset{bar}; $counter++; } ## end second foreach # .. other specific keys ## Now you can sort and print the array. This probably isn't a good answer, but it might bring forth some of the guru's :) -- T.Thread Previous