Scalars - Assignment The equals sign is used to assign a value to a scalar: $foo = 4; Assigns the number 4 to the scalar $foo. After assignment, you can operate on $foo as if it were the number 4: $foo = $foo + 4; # $foo is now 8. You can change the value of $foo at any time: $foo = "cat";