On Thu, Aug 03, 2000 at 10:02:44AM -0400, Tad McClellan wrote:
>
> On Thu, Aug 03, 2000 at 10:53:02AM +0100, Hildo Biersma wrote:
>
> > If functions could distinguish between
> > 'wantarray' and 'wanthahs' this would be easy to do.
>
>
> Due to the recent "rename local()" and "can't return an array"
> discussions here, we should also consider "rename wantarray()"
> as well.
>
> It should be named wantlist()
Well, perhaps we should rename it to whatdoyouwant() :-)
Or perhaps you prefer the shortened version, want()?
if (want eq 'hash') { return %hash }
elsif (want eq 'array') { return @{$hash{vector}} }
elsif (want eq 'scalar') { return $hash{vector]->[0] }
elsif (want eq 'handle') { return $hash{filehandle} }
/me patiently awaits all those RFCs (or are we calling them PCRs now,
and won't that confuse the biotechnologists?) from Damian Conway.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
- Re: wanthash (Was: Re: date interface... Johan Vromans
- Re: wanthash (Was: Re: date interface... Damian Conway
- Re: wanthash (Was: Re: date inte... Piers Cawley
- Re: wanthash Dan Sugalski
- Re: wanthash Peter Scott
- Re: wanthash Graham Barr
- Re: date interface (was Re: perl6 requirement... Simon Cozens
- Re: date interface (was Re: perl6 require... Tom Christiansen
- Re: date interface (was Re: perl6 req... Simon Cozens
- wantarray() should be named wantlist() (was R... Tad McClellan
- Re: wantarray() should be named wantlist(... Jonathan Scott Duff
- Re: wantarray() should be named wantl... Clayton Scott
- Re: wantarray() should be named ... Jonathan Scott Duff
- Re: wantarray() should be na... Nathan Wiger
- Re: wantarray() should be na... skud
- Re: wantarray() should be named wantlist(... Graham Barr
- Re: wantarray() should be named wantlist() (... Damian Conway
- Re: wantarray() should be named wantlist(... Tad McClellan
- Re: date interface (was Re: perl6 requirements, o... Tom Christiansen
- Re: date interface (was Re: perl6 requirement... Matt Sergeant
- Re: date interface (was Re: perl6 requirements, on boo... Damian Conway
