On Sat, Oct 07, 2000 at 10:38:21AM +0200, Bart Lateur wrote:
> On Fri, 6 Oct 2000 23:26:44 -0500, Jonathan Scott Duff wrote:
> 
> >     @foo = split;
> >     # BECOMES
> >     @foo = split; pop @foo until $foo[-1];
> 
> That doesn't fly. What if that last field is "0"?
> 
> 
> >     @foo = split ' ';
> >     # BECOMES
> >     @foo = split /\s+/; shift @foo;
> 
> What if there is no leading whitespace? You shift out a perfectly valid
> field.
> 
>       shift @foo if @foo and length $foo[0];

Yeah, you're right ... musta been my lack of sleep at the time.

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to