|
|
| go ahead... be a heretic | |
| PerlMonks |
Re: Split and empty stringsby TheoPetersen (Priest) |
| on Apr 10, 2001 at 15:22 UTC ( [id://71366]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
Are the empty lines at the end, perhaps? By default, split
trims the returned list at the first empty value. See perlfunc:split
for the exact terms. Update: I just tried this code, and it works as I expect. The output for my Perl 5.6.1 system is:
$ perl ~/split.pl one two three fourwith the blank printed between three and four, and nothing thereafter.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||