[tpm] why aren't field counts being preserved?

Fulko Hew fulko.hew at gmail.com
Wed Apr 28 09:56:10 PDT 2010


On Wed, Apr 28, 2010 at 12:49 PM, Stuart Watt <stuart at morungos.com> wrote:

> Fulko Hew wrote:
>
>> What am I doing wrong here???
>>
>> I want to have an octet string that uses nulls to delimit fields,
>> and then the receiver should be able to 'split' on nulls to
>> restore the original array.
>>
>> Empty strings in the middle of the array are preserved, but
>> empty strings at the end of the array are not.
>>
>> I need them all to be preserved!
>> What am I missing?
>>
>> TIA
>> Fulko
>>
> A limit of -1 as an additional parameter to split will do the trick. It's
> in perldoc -f split, but well hidden
>

Thanks, works great now!
My mistake was only reading the Camel book, and Google.  :-(
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20100428/b68b9743/attachment.html>


More information about the toronto-pm mailing list