in reply to Sort output

  1. The while(<FILE>) { reads the file one line at a time so there is no need to split the $_ then. So the split to @all is superfluous.
  2. You should use chomp() not chop() if you want to remove the newline character. The thing is that the chop() removed one character, no matter what it is. So if the last line in the file doesn't end with a newline character, you will remove the last character of the line!
  3. You use a heluvalot of related variables there, maybe you should rather stick all this data into a hash. You will actually need to do that to be able to sort the items.
    while (<FILE>){ chomp; my %store;@store{Id Name Username Password ...} = split / /; $store{km} = ... push @stores, \%store; } foreach (sort {$a->{km} <=> $b->{km}} @stores) { print "...." }
  4. You stick the values of those variables into the URL without any escaping whatsoever! What if the data contain something that's special in URLs? Spaces, &s, #s, %, ... You should always make sure you escape all the data you print in whatever way necessary for the place you stick them at! (In this case have a look at CGI::Enurl for example.)

Jenda
Enoch was right!
Enjoy the last years of Rome.