📘 Postfix operator ++ in Perl 6

Postfix operators are unary operators placed after their single operand.

++ is a postfix increment. The change of the value happens after the current value is used in the expression.

my $x = 42;
say $x++; # 42
say $x;   # 43

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s