---------------------------- #!/usr/local/bin/perl my(%test,$j)=(); $test{'2007030110300020070301133000'}++; $test{'2007030110300020070301143000'}++; foreach $j (sort{$a<=>$b}(keys(%test))) { print "Key: $j\n"; } ------- results ------ [root@localhost]# perl test_sorting.pl Key: 2007030110300020070301143000 Key: 2007030110300020070301133000
In reply to Sorting Puzzle by willfould
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |