in reply to Re: Sorting an array of lines
in thread Sorting an array of lines

print "@sorted\n";
Probably not what you want. You chomped the initial list, and $" is usually not set to \n.

Either don't chomp (don't chomp unless you need the data chomped) and print @sorted; or print "$_\n" for @sorted; or print map "$_\n", @sorted;.

2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$