{ package Tie_timer; sub TIESCALAR { bless {}, shift } sub FETCH { scalar localtime } } tie $now, Tie_timer; print $now;
-- Randal L. Schwartz, Perl hacker
In reply to Re: Tying
by merlyn
in thread Need simple example tying scalar to localtime()
by blueflashlight
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |