Perl Programming/Keywords/abs

Previous: __PACKAGE__ Keywords Next: accept

The abs keyword

edit

Function abs returns the absolute value of VALUE, or of $_, if VALUE is omitted.

Syntax

edit
  abs VALUE
  abs

Examples

edit
  The code
print abs(-21.7*.36);
returns with
7.812


Previous: __PACKAGE__ Keywords Next: accept