February 2012
Intermediate to advanced
1184 pages
37h 17m
English
abs VALUE
absThis function returns the absolute value of its argument.
$diff = abs($first – $second);
Here and in the examples following, good style (and the strict pragma) would dictate that you add a my modifier to declare a new lexically scoped
variable, like this:
my $diff = abs($first – $second);
However, we’ve omitted my from
most of our examples for clarity. Just assume that any such variable was
declared earlier.
Read now
Unlock full access