Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^2: Syntax Perl Version support $c = () = $a =~ /\./gby haukex (Archbishop) |
on Jul 17, 2018 at 19:13 UTC ( [id://1218685]=note: print w/replies, xml ) | Need Help?? |
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).
In Section
Seekers of Perl Wisdom
|
|