in reply to Sorting Question

In addition to the lovely sorting advice found here, you might consider rewriting your code in a more perlish way. The C-style loops with counters are all right, but perl has while and for(each) loops that do the same thing, except better. ;)

Damon Allen Davison