:)
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]
In reply to Re: meaning of =()= (null list accumulator, list counter)
by Anonymous Monk
in thread meaning of =()=
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |