? is a unary operator casting the context to a Boolean one by calling the Bool method on an object.
say ?42; # True
The second form, so, is a unary operator with lower precedence.
say so 42;Β Β # True say so True; # True say so 0.0;Β # False
Science, Programming, Electronics, Languages
N. B. Perl 6 has been renamed to Raku. Click to read more.
? is a unary operator casting the context to a Boolean one by calling the Bool method on an object.
say ?42; # True
The second form, so, is a unary operator with lower precedence.
say so 42;Β Β # True say so True; # True say so 0.0;Β # False