Contents | Up | Prev | Next |
Here are some perl operators of interest.
Respectively adds, subtracts, multiplies and divides two floating point numbers.
Raises "a" to the power of "b". Works on floating point numbers too.
Concatenates two strings. The comma (,) as used by print does not really concatenates two strings, but rather prints them one after the other. (There's a subtle difference in functionality of the print command too, but we won't get into that, now).
print "Hello," . " " . "World!" . "\n" . "And this is the second line.\n";
Returns the modulo (remainder) of "b" from "a". If "a" and "b" are not integers they are rounded to an integral value.
Makes sure that sub-expr is evaluated as a separate sub-expression , an operation that could override the default operator precedence.
There are many more, but they will be covered later. For a complete list and more detailed information about the various perl operators consult the "perlop" document on your system.
Contents | Up | Prev | Next |
Written by Shlomi Fish