Perl Split Function - Perl Views : 246
Tagged in : Perl
0 0
Send mail

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"
By Geethalakshmi, On - 2010-09-17



    Login to add Comments .