On Tue, Sep 05, 2000 at 11:16:48AM +1100, Damian Conway wrote:
>    > By RFC 21, it looks like the call would be
>    > 
>    >    if ( want 'LIST' ) {
>    >       $num_to_return = want;
>    >       # do stuff
>    >    }
> 
> or, more efficiently:
> 
>        if ( ($num_to_return) = want 'LIST' ) {
>           # do stuff
>        }

And more correct as I would assume that

  () = some_func();

  sub some_func {
        if ( ($num_to_return) = want 'LIST' ) {
           # do stuff
        }
  }

$num_to_return would be zero, but the assignment would cause the if() to
be true.

Graham.

Reply via email to