Using join function to add separator : join « Array « Perl






Using join function to add separator

    

@array = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
print join(", ", @array);

   
    
    
    
  








Related examples in the same category

1.Push array and join
2.Join array
3.Joining each element of a list with a newline
4.The join function joins the elements of an array into a single string