September 2017
Beginner
402 pages
9h 52m
English
These are the prefix operators to increment and decrement the value.
Prefix forms of these operators first change the value of the variable and then return the result.
my $n = 42;++$n;say $n; # 43say --$n; # 42
In Perl 6, both ++ and -- operators have the form of postfix operators (see examples in the Postfix operators section later in this chapter).