Perl Programming/Keywords/oct

From testwiki
Revision as of 07:55, 16 April 2020 by imported>DannyS712 (Update syntaxhighlight tags - remove use of deprecated <source> tags)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Prognav

The oct keyword

oct is a function that interprets EXPRESSION as a string with an octal value. If, however, the expression starts with "0b" or "0x", it interprets its value as binary or hexadecimal, respectively. A leading whitespace is always ignored.

Without the EXPRESSION, $_ is used as the source.

Syntax

  oct EXPRESSION
  oct

Examples

Template:Code:Valid Template:BookCat Template:Prognav

Template:BookCat