in reply to Re: variable declaration
in thread variable declaration

In newer Perls, you can also use
use strict; use warnings; use feature qw/state/; sub myFunc { state $persistent; return $persistent++; } print myFunc(); print myFunc(); print myFunc();