aquarium has asked for the wisdom of the Perl Monks concerning the following question:
the output is 12...i want the assignment to assign into empty array elements as i would expect...so that the output should be 15. what's going on? how to fix?$text = 'a|b|c|||||||||e||||'; @array = split(/\|/,$text); print scalar(@array);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: assigning to array from a split with some empty fields
by hv (Prior) on Apr 14, 2004 at 12:51 UTC | |
|
Re: assigning to array from a split with some empty fields
by pelagic (Priest) on Apr 14, 2004 at 12:56 UTC | |
|
Re: assigning to array from a split with some empty fields
by periapt (Hermit) on Apr 14, 2004 at 13:19 UTC | |
by flyingmoose (Priest) on Apr 14, 2004 at 18:30 UTC | |
|
Re: assigning to array from a split with some empty fields
by Tomte (Priest) on Apr 14, 2004 at 13:08 UTC |