Perl Split Function
by Geethalakshmi[ Edit ] 2010-09-17 14:09:22
Perl Split Function
The split() function breaks apart an expression based on a delimiter value. This can be used to parse a scarlar variable into an array so each field can be treated as a single element.
$value = "field1:field2:lastfield";
@fields = split(/:/,$value);
@fields = "field1", "field2", "lastfield"