in reply to Re: Sort lines in a file
in thread Sort lines in a file

Next, do the sorting while you're processing the input:
Isn't it faster to do the sorting outside of the loop? What am I missing?
while(<$IN>) { next if m/^\n/; push (@output, $_); } @output = sort @output;