|No such thing as a small change|
Ambiguous '~~' in 'print scalar ~~list'by rsFalse (Hermit)
|on Mar 12, 2019 at 13:10 UTC||Need Help??|
rsFalse has asked for the wisdom of the Perl Monks concerning the following question:
I was playing with '~~' "operator" (perlsecret#Inchworm), which is equivalent to 'scalar()' if parsed as two consecutive unary bit-inverting operators, not as experimental smartmatch op. And there is a case where parser can't understand what do I mean (unary forcing scalar or binary smartmatch):
STDERR: Smartmatch is experimental at smartmatch_or_scalar.pl line 9.
> cat out.txt
In my opinion usual operators (bit-inversion) should be in higher precedence of parsing than experimental operators, but in my code '~~' was interpreted as experimental smartmatch.