while(<$IN>) { next if m/^\n/; push (@output, $_); } @output = sort @output;