> > A scalar context C<want> would also need to DWIM, presumably by returning
   > > "0, but true" in that (unusual) situation.
   > 
   > Actually, given Damian's and my conversations last night, it looks like
   > the first return arg from want() is going to be the context after all
   > (since then if's and cases's work correctly).

That's correct.


   > And you can now get the number to return by referencing element 1:
   > 
   >    if ( ($num_to_return) = (want 'LIST')[1] ) {   # '3'
   >         # do stuff
   >    }

Or more tidily by treating C<want> as a hashref:

      if ( $num_to_return = want->{COUNT} ) {
           # do stuff
      }


Damian

Reply via email to