then you avoid the problem altogether, and you also avoid having to drop the whole key list onto the stack and dereference the hash needlessly.while (my ($key, $func) = each %Movement) { $foo->$func; }
I think each is underused, and is a better idiom for many loops which use keys.
In reply to Re: Weird function calling...
by robin
in thread Weird function calling...
by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |