- publishing free software manuals
Perl Language Reference Manual
by Larry Wall and others
Paperback (6"x9"), 724 pages
ISBN 9781906966027
RRP £29.95 ($39.95)

Sales of this book support The Perl Foundation! Get a printed copy>>>

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 "Perl pragma to enable new features" (feature) in the Perl Library Reference Manual (Volume 1).

ISBN 9781906966027Perl Language Reference ManualSee the print edition