help | logout
percentConvert

percentConvert

Name

percentConvert -- Converts percent value to decimal.

Synopsis

$err = $mod->percentConvert($data);

Description

This function converts a percentage into a decimal.

Examples are:

  • "2%"

  • "6.4%"

  • "204 percent"

  • "2"

Returns

Returns a string representation of the given data (or -1 if an error occurred). In case of error, the program will croak() with an appriopriate message.