in reply to splitting a string
Hi,
From split doc,
use strict; use warnings; my $string = "/home/source::::::::DATE:SUBJECT:NAME::::::"; my @array = split(/:/,$string, -1); $" = '><'; print "<@array>\n"; print scalar(@array); output: ------- </home/source><><><><><><><><DATE><SUBJECT><NAME><><><><><><> 17
Prasad
|
---|
In Section
Seekers of Perl Wisdom