both => sub { select_language(); select_animal(); }
Then I ran your code with action=both and lo and behold! The value was the same in both the subroutines.
Do you expect the value to be the same for different runs of the script?
In reply to Re: Accessing Variables in Different Subroutines
by choroba
in thread Accessing Variables in Different Subroutines
by stefl
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |