use strict; use warnings; use feature qw/state/; sub myFunc { state $persistent; return $persistent++; } print myFunc(); print myFunc(); print myFunc();
In reply to Re^2: variable declaration
by choroba
in thread variable declaration
by Priti24
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |