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;
In reply to Re^2: Sort lines in a file
by toolic
in thread Sort lines in a file
by blackdragoen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |