develooper Front page | perl.perl6.language | Postings from May 2001

Re: Please make "last" work in "grep"

Thread Previous | Thread Next
From:
Damian Conway
Date:
May 2, 2001 12:59
Subject:
Re: Please make "last" work in "grep"
Message ID:
200105021959.FAA26359@indy05.csse.monash.edu.au
   > > Because you might have a wantarray situation that expects no values?
   > > 
   > > 	() = whateveryouwant();
   > 
   > I am sure that situation is handled by the 'want' RFC.

Yep. The most recent version is at:

	http://www.yetanother.org/damian/Perl5+i/want.html

   > I have not read it recently, but I suspect in this case
   > want('LIST') would return that magical "0 but true" or something
   > similar.

No. It provides this information as (want)[1] or want->{COUNT}.
But more frequently, the programmer herself would provide the information:

	if (want 3) {...}

Damian

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About