sub routine { state %hash = ...; ... %hash ... }
It's kinda like the following, but the assignment is actually done the first time state is evaluated.
my %hash; BEGIN { %hash = ...; } sub routine { ... %hash ... }
In reply to Re: Is this BEGIN construct supposed to work?
by ikegami
in thread Is this BEGIN construct supposed to work?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |