Parses the specified number string using the specified base system.
"number" - the string to parse.
base - an integer indicating the base to use, defaults to 10. The following table contains a few options, really this function is flexible towards any base system you choose to specify.
Base Description 2 binary 8 octal 10 decimal 16 hex
A long scalar resulting from parsing the number string with the specified base.
$value = parseNumber("1337", 16); println("0x1337 is: $value"); $value = parseNumber("10001001", 2); println("10001001 is: $value");
0x1337 is: 4919 10001001 is: 137