Ubuntu Unleashed

6.2. Assignment Operators

The assignment operators set the values of variables either by copying the value or copying a reference to a value. They are shown in Table 6-2.

Table 6-2. The assignment operators

=

Assignment

Copies $b's value into $a, unless $b is an object, in which case the same object is in both places: $a = $b

=&

Reference

Set $a to reference $b: $a =& $b

Категории