http://www.perlmonks.org?node_id=528099


in reply to Re: Perl Idioms Explained - my $count = () = /.../g
in thread Perl Idioms Explained - my $count = () = /.../g

You misunderstood me. A list assignment in scalar context returns the number of elements.
my $count = (LIST1) = (LIST2);
The chunk in bold is the list assignment. That is put in scalar context by the my $count = ... part.

Please see Re: Longest repeated string... for further clarification.


Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart