
ichi
User
Jul 30, 2009, 9:41 PM
Post #5 of 7
(3892 views)
|
Re: [santhosh_89] Split Operation
[In reply to]
|
Can't Post
|
|
Before seeing the output,don't put the answer,Please check the output. Example the array will have the element [a,b] in first index.But you have split based on the comma(,).If you do like wise the first element will be '[a',....... kev is kind enough to help you, so be polite. you are the beggar here, so you can't choose.
my $test="[a,b],c,'d',[e,[f,g,h,[i,j],k,l],m,n],o,p"; @s = split(/,/,$test); print join(",",splice(@s,0,2)) ."\n" ; print join("," ,@s); the above is not complete. I expect you to get the gist of it, and complete it yourself.
|