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];

-- 
        Bart.

Reply via email to