* David A. Black <dblack / rubypal.com> (2009-09-30) schrieb:

> On Thu, 1 Oct 2009, Simon Krahnke wrote:
>
>> * Paul Smith <paul / pollyandpaul.co.uk> (2009-09-29) schrieb:
>>
>>>> ? ?fields = data.split(",")
>>>> ? ?hash = fields[0]
>>>> ? ?ocrID = fields[1]
>>
>> BTW, you could write this as:
>>
>> hash, ocrID = *data.split(",")
>>
>> or
>>
>> hash, ocrID, *ignored = *data.split(",")
>>
>> if you want to ignore everything behind a second comma, or
>>
>> hash, ocrID = *data.split(",", 2)
>>
>> if you want to include a second comma and everything behind it into the
>> ocrID string.
>
> I don't think you need the * for any of them.

I always include it anyway, to be explicit.

> This:
>
>   hash, ocrID = data.split(',')
>
> should be fine for getting the first two values.

Right, I just tried it. I thought you might be getting an array into
ocrID, but you don't.

mfg,                         simon .... l