in reply to split tosses away empty components even with positive width separators?
Consider the following:
use strict; use warnings; my $empty = ''; my $newString = $empty . $empty . $empty . $empty;
Is $newString now comprised of four empty strings? Continuing with the above, what about the following:
my $forSplit = $newString . 'x' . $newString; my @list = split 'x', $forSplit;
Would you expect @list to now contain the following?
'','','','','','','',''
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: split tosses away empty components even with positive width separators?
by wrog (Friar) on May 06, 2013 at 01:49 UTC | |
by Kenosis (Priest) on May 06, 2013 at 05:43 UTC | |
by wrog (Friar) on May 06, 2013 at 12:26 UTC |