in reply to meaning of =()=
:)
In scalar context the null list as lvalue counts (accumulates and returns number of elements )
$ perl -e " @g=( 1 .. 4 ); $f[0]=()=@g; dd\@f; dd\@g " [4] [1 .. 4]
In list context the null list as lvalue is null (accumulates and discards )
$ perl -e " @g=( 1 .. 4 ); @f=()=@g; dd\@f; dd\@g " [] [1 .. 4]
|
|---|