On Dec 4, 2:47 pm, [EMAIL PROTECTED] (Rob Dixon) wrote:
> [EMAIL PROTECTED] wrote:

> > As it happens, even if there was a '.' as the last character in your
> > input string then you'd still get the same message. This is counter-
> > intuitive but is documented in the documentation of the split()
> > function.
>
> No.
>
>    my @list = split /\./, '1000.';
>
> will indeed generate only one value, but split() will omit trailing null
> fields only if the number of fields is defaulted. In this case the
> call is
>
>    my ($n,$d) = split /\./, shift, 2;

Think I need my eyesight tested. I just completely didn't see that 2
in there. Last night I walked into a room and completely failed to see
a kettle that was right in front of me.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to