This should explain it.
say( '$count = () = ( wantarray() ) gives ', ( $count = () = ( wantarray() ) ) ? "List" : "Scalar", " context to wantarray()." ); say( '$count = ( wantarray() ) gives ', ( $count = ( wantarray() ) ) ? "List" : "Scalar", " context to wantarray()." );
The output:
$count = () = ( wantarray() ) gives List context to wantarray(). $count = ( wantarray() ) gives Scalar context to wantarray().
Dave
In reply to Re: regexp match count
by davido
in thread regexp match count
by ramprasad27
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |