I have this statement;

foreach my $key ( keys %filehash ) {
    print "$key $filehash{$key}->[0]\t\t\t$filehash{$key}->[3]\t
$filehash{$key}->[2]\t $filehash{$key}->[1]\n";
}

but wish to sort the output by $filehash{$key}->[0]. Is it possible? How
do I do this?

I can't make a separate hash of the value because of multiple values of
the value

http://perldoc.perl.org/perlfaq4.html#How-do-I-sort-a-hash-(optionally-by-value-instead-of-key)%3f
( http://goo.gl/Ol31 )
only shows the sorting where the hash has only a scalar.



TIA


Owen





-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to