Perl version

Modules

  • ABCDE
  • FGHIL
  • MNOPS
  • TUX

state

Perl 5 version 12.4 documentation
Recently read

state

  • state EXPR

  • state TYPE EXPR
  • state EXPR : ATTRS
  • state TYPE EXPR : ATTRS

    state declares a lexically scoped variable, just like my does. However, those variables will never be reinitialized, contrary to lexical variables that are reinitialized each time their enclosing block is entered.

    state variables are enabled only when the use feature "state" pragma is in effect. See feature.