|
|
| more useful options | |
| PerlMonks |
Re: Odd workings of splitby morgon (Chaplain) |
| on Mar 29, 2012 at 12:50 UTC ( #962377=note: print w/ replies, xml ) | Need Help?? |
|
From "perldoc -f split": Note that splitting an EXPR that evaluates to the empty string always returns the empty list.So it's not split that returns an undef, but the first element of the empty list that split returns (which is what you want to use) is undef. I guess if you want to pass on an empty string (as opposed to undef) in such cases you would have to add a clause such as
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||