On Fri, 1 Sep 2000 07:27:24 +1100 (EST), Damian Conway wrote: > > > And has anyone pointed out that C<list> is just: > > > > > > sub list {@_} > > > > Um no. I would expect it to be > > > > sub list { @_[0..$#_] } > >It's too early in the morning. >The subtlety here escapes me. It's the difference between an array and a list. sub array { @_ } sub list { @_[0..$#_] } @a = qw(a b c); $\ = "\n" print scalar array @a; print scalar list @a; --> 3 c I'm not sure if we want indeed the array or the list effect. Because, if we do list, then in print scalar list qw(a b c); the "list" will have no effect, it will print "c"; but in @a = qw(a b c); print scalar array @a; the "array" has not effect, this prints "3". -- Bart.
- RFC 175 (v1) Add C<list> keyword to force list c... Perl6 RFC Librarian
- Re: RFC 175 (v1) Add C<list> keyword to for... skud
- Re: RFC 175 (v1) Add C<list> keyword to... Nathan Wiger
- Re: RFC 175 (v1) Add C<list> keyword to for... Damian Conway
- Re: RFC 175 (v1) Add C<list> keyword to... Nathan Wiger
- Re: RFC 175 (v1) Add C<list> keyword to... Graham Barr
- Re: RFC 175 (v1) Add C<list> keywor... John Porter
- Re: RFC 175 (v1) Add C<list> keyword to... Damian Conway
- Re: RFC 175 (v1) Add C<list> keywor... Bart Lateur
- Re: RFC 175 (v1) Add C<list> ke... Peter Scott
- Re: RFC 175 (v1) Add C<list> keyword to... Damian Conway
- Re: RFC 175 (v1) Add C<list> keywor... Tom Christiansen
- Re: RFC 175 (v1) Add C<list> ke... Steve Fink
- Re: RFC 175 (v1) Add C<list&g... Graham Barr
- Re: RFC 175 (v1) Add C<list&g... Tom Christiansen
- Re: RFC 175 (v1) Add C<list> ke... Nathan Wiger
- Re: RFC 175 (v1) Add C<list&g... Tom Christiansen
- Change "($one, $two)=&q... Nathan Wiger
- Re: Change "($one, ... Tom Christiansen