in reply to bubble sort problems
Waah! Mommy, the bad man hurt my eyes. ;-)
First, don't use parallel arrays. That is so Perl4. Make a nice array of arrays, probably like this:
Look at data structures cookbook for more.($placeholder, $page, $date, ...) = split; push @raw, [ $placeholder, $page, $date ... ];
Second, a monstrously efficient quicksort is built in to Perl. @sorted = sort { $a->[2] cmp $b->[2] } @raw;(Assuming $date is element 2 of the array, as outlined in the first example.) Et voila.
HTH
|
|---|