is a funky way of writing$scalar =()= EXPR
$scalar = ( () = EXPR )
It consists of two operations: a list assignment (() = EXPR) as the RHS of a scalar assignment ($scalar = ...). Both types of assignments are documented in perlop, but the bits that apply are:
In short, it's a means of evaluating an expression in list context and returning the number of elements returned instead of the elements themselves.
See Mini-Tutorial: Scalar vs List Assignment Operator
In reply to Re: meaning of =()=
by ikegami
in thread meaning of =()=
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |