You may be looking for Tie::Scalar::Timeout. If you really do want a subroutine to be returning the value you could build a closure around the sub, and declare the tied variable into the broader-scope of the closure. It can be tied within the sub, as needed.
Dave
In reply to Re: A value that stays a value (for some time)
by davido
in thread A value that stays a value (for some time)
by freakingwildchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |