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.
- RFC 361 (v1) Simplifying split() Perl6 RFC Librarian
- Re: RFC 361 (v1) Simplifying split() Bart Lateur
- Re: RFC 361 (v1) Simplifying split() Bart Lateur
- Re: RFC 361 (v1) Simplifying split() Chaim Frenkel
- Re: RFC 361 (v1) Simplifying split() Jonathan Scott Duff
- Re: RFC 361 (v1) Simplifying split() Bart Lateur
- Re: RFC 361 (v1) Simplifying split() Tom Christiansen