# Declare a new identifier $x and bind it to a new mutable Scalar container: my $x; # Assign a value into the Scalar: $x # An LHS reference to a Scalar returns the Scalar. = # = is assignment. The LHS decides what to do with it. 9.9; # Creates a new immutable Rat. # VAR macro returns what the identifier is bound to: say $x.VAR.^name; # Scalar -- the type of variable bound to $x. # All other uses of $x or a Scalar on RHS return the value assigned into the Scalar: say $x; # 9.9 say $x.^name; # Rat -- the type of the value assigned into the Scalar. $x *= 2; # This is equivalent to ... $x = $x * 2; # ... which assigns result of RHS expression into Scalar on LHS. say $x; # 39.6