The join function joins the elements of an array into a single string : join « Array « Perl






The join function joins the elements of an array into a single string

    

Format: join(DELIMITER, LIST)

# Joining each elements of a list with colons
$name="Tom";
$birth="11/12/2009";
$address="10 Main St.";
print join(":", $name, $birth, $address ), "\n";

   
    
    
    
  








Related examples in the same category

1.Push array and join
2.Using join function to add separator
3.Join array
4.Joining each element of a list with a newline