Joining each element of a list with a newline : join « Array « Perl






Joining each element of a list with a newline

    
@names=('A','C','C','D','E');
@names=join("\n", sort(@names));
print @names,"\n";

   
    
    
    
  








Related examples in the same category

1.Push array and join
2.Using join function to add separator
3.Join array
4.The join function joins the elements of an array into a single string