Apr 142009
Split a string into array in Perl
Answer:
To split a string into an array in Perl, follow the codes below
my $data = 'peter,mary,john';
my @values = split(',', $data);
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Split a string into array in Perl
Answer:
To split a string into an array in Perl, follow the codes below
my $data = 'peter,mary,john';
my @values = split(',', $data);