Re: RFC 361 (v1) Simplifying split()

2000-10-07 Thread Bart Lateur
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 th

Re: RFC 361 (v1) Simplifying split()

2000-10-06 Thread Jonathan Scott Duff
On Fri, Oct 06, 2000 at 11:59:31AM -0600, Sean M. Burke wrote: > The current behavior makes trailing empty fields non-existent, and that's a > bizarre and nonintuitive thing to have be a default; if your code relies on > them being removed, then remove them explicitly, without expecting split to >

Re: RFC 361 (v1) Simplifying split()

2000-10-06 Thread Tom Christiansen
>Sean M. Burke wrote: >> >> The current behavior makes trailing empty fields non-existent, and that's a >> bizarre and nonintuitive thing to have be a default; >Only to some people; and besides, it's well documented. Well, Sean is right in that it is very bizarre to many people. I know that whe

Re: RFC 361 (v1) Simplifying split()

2000-10-05 Thread Chaim Frenkel
> "PRL" == Perl6 RFC Librarian <[EMAIL PROTECTED]> writes: PRL> =item 2. Empty trailing fields are currently suppressed (although a PRL> -1 as the third argument disables this). I suggest that empty trailing PRL> fields be retained by default. Extremely useful, I rely on this. It makes non-

Re: RFC 361 (v1) Simplifying split()

2000-10-01 Thread Bart Lateur
On Sun, 01 Oct 2000 11:18:58 +0200, Bart Lateur wrote: > my @a = split /:/, "", -1; Oops. that should be my @a = split /:/, $_, -1; -- Bart.

Re: RFC 361 (v1) Simplifying split()

2000-10-01 Thread Bart Lateur
On 1 Oct 2000 06:40:08 -, Perl6 RFC Librarian wrote: >Perl 5 split does five things that I think are just annoying, and >which I suggest be removed: I've got one more problem. for my $i (0 .. 4) { $_ = ':' x $i; my @a = split /:/, "", -1; my $coun