i want to sort an array for certain key words first and then alphabetically.
my @foo = qw/foo bar baz first second third/;
foreach my $i (sort {$a cmp $b} @foo) {
print "$i\n";
}
How do I make 'first', 'second', and 'third' come before the rest?
(I'm actually dealing with a hash)
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/
