📘 Prefix operator - - in Perl 6

📘 Prefix operator - - in Raku

N. B. Perl 6 has been renamed to Raku. Click to read more.

- - is a prefix form of decrement. It works exactly like the ++ prefix but, of course, makes the operand smaller (whether it be a string or a number).

my $x = 42;
say --$x; # 41

Leave a Reply

Your email address will not be published. Required fields are marked *