in reply to Re^2: Sorting within a file
in thread Sorting within a file

Or:
perl -e "print sort {$a <=> $b} <>" test.txt