Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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

by RichardK (Vicar)
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?
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: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 browsing the Monastery: (10)
As of 2015-08-30 19:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (350 votes), past polls