Think about Loose Coupling | |
PerlMonks |
Re: About "state" variables in Perl 5.10by shmem (Chancellor) |
on Dec 28, 2007 at 16:48 UTC ( [id://659352]=note: print w/replies, xml ) | Need Help?? |
Since I find the latter very simple to follow and understand I would like to know if there are differences between themEr... between what? Do you know the difference between a hippo? <Reveal this spoiler or all in this thread>
Each sub has its own scope, so sharing a lexical state variable via state $var is not an option, you have to allocate that var in an outer scope. my and state make no difference there. --shmem
In Section
Seekers of Perl Wisdom
|
|