in reply to Re^2: Perl script does not work on other directories?
in thread Perl script does not work on other directories?

i was trying to figure out how to sort the -d and -f without having to use two loops. but i am unsure how to use sort to do such a thing.
  • Comment on Re^3: Perl script does not work on other directories?

Replies are listed 'Best First'.
Re^4: Perl script does not work on other directories?
by SuicideJunkie (Vicar) on Nov 26, 2014 at 18:45 UTC

    You want to compare one thing, and then if it's the same, compare something else, and continue until you're sure they're both identical.

    @results = sort { MostImportantFeature($a) <=> MostImportantFeature($b) or NextFeature($a) <=> NextFeature($b) or LeastImportantFeature($a) <=> LeastImportantFeature($b) } @source;
      awesome. thanks for making it very simple to understand haha