Nowadays you can use
I explicitly stringify $answer because if $answer happens to be something else (like an object) the ~~ operator will act differently and I don't want that. On the contrary, I want to allow objects that may stringify to "add" or "a".use 5.010; if ("$answer" ~~ [ 'add', 'a' ]) { ... }
lodin
In reply to Re^2: Subroutines within if statements
by lodin
in thread Subroutines within if statements
by muizelaar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |