Perl Programming/Keywords/local

From Wikibooks, open books for an open world
Jump to navigation Jump to search
Previous: listen Keywords Next: localtime

The local keyword[edit | edit source]

The local keyword modifies the listed variables to be local to the enclosing block, file, or eval. It is doing the same as my. If EXPRESSION consists of more than one element, it must be placed in parenthesis.

With delete local EXPRESSION, the deletion of an array/hash element is made local to the current block.

Syntax[edit | edit source]

  local EXPRESSION

See also[edit | edit source]

Previous: listen Keywords Next: localtime