go ahead... be a heretic | |
PerlMonks |
Re: Unable to extract elements from a split. Kindly Help.by perl514 (Pilgrim) |
on Dec 24, 2011 at 07:18 UTC ( [id://945018]=note: print w/replies, xml ) | Need Help?? |
Hi Honoured GrandFather, I tried your code but removed the <<TICKSTR with the actual command and the output is the same as yours. Thanks for the pointer.I didn't understand it when you said "but the array is in scalar context in the split". So I tried the following code:
And the output was:
So this means that, eventhough I mention my @splitarray = split (/ /, <b>@array</b>);, the @array is still taken in a scalar context. So that means whatever I give inside the bracket in the split function is taken in a scalar context? I am confused on this one. Kindly guide me to some pointer that will clarify this confusion. Perlpetually Indebted To PerlMonks
In Section
Seekers of Perl Wisdom
|
|