Mega Code Archive

 
Categories / Perl / String
 

Using split function to split a string

$headline = "a b c d e"; foreach (split " ", $headline) {     print ucfirst, " "; }