Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: split tosses away empty components even with positive width separators?

by RichardK (Priest)
on May 06, 2013 at 01:33 UTC ( #1032164=note: print w/ replies, xml ) Need Help??


in reply to split tosses away empty components even with positive width separators?

The help for split say this, so I think it's expected behaviour (but it is very late here !)

If LIMIT is omitted (or, equivalently, zero), then it is usually treated as if it were instead negative but with the exception that trailing empty fields are stripped (empty leading fields are always preserved); if all fields are empty, then all fields are considered to be trailing (and are thus stripped in this case).


Comment on Re: split tosses away empty components even with positive width separators?
Re^2: split tosses away empty components even with positive width separators?
by wrog (Monk) on May 06, 2013 at 01:53 UTC
    Ah, I need to set LIMIT = -1. Thank you!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1032164]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2014-07-23 21:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (152 votes), past polls