in reply to how to sort string in perl

$ sort <infile >outfile