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

Put this code in your program file:
use strict; print sort {$a <=> $b} <> __END__ Usage example: sort.pl data.txt