Simply change this line from: `cat temp | sort -r -t ":" +1 -n > @ARGV[1].sorted`; to: `cat temp | sort -r -t ":" -k 1 -n > @ARGV[1].sorted`; technorati tags:, ,