in reply to Re: Syntax Perl Version support $c = () = $a =~ /\./g (updated)
in thread Syntax Perl Version support $c = () = $a =~ /\./g

AFAIK, Perl 5.x has always supported this

I'm having some trouble running a bisect at the moment, but as a tentative result, it appears that Perl versions roughly before 5.004 didn't like the test program -e '$a="f.o.o.bar"; $b=()=$a=~/\./g; $b==3 or die $b' because Can't modify stub in list assignment at -e line 1, near "/\./g;". AFAICT it was not possible to assign to an empty list back then (a workaround seems to be $b = @{[]} = $a =~ /\./g;, which works on 5.000).

Replies are listed 'Best First'.
Re^3: Syntax Perl Version support $c = () = $a =~ /\./g
by h2 (Beadle) on Jul 17, 2018 at 19:16 UTC
    haukex, thanks for digging in to find the lower limit, that was a key thing I needed to know. I'll note this in the docs, but I doubt I will ever need to go older than Perl 5.008 but I have learned painfully to never say never in this area.