in reply to Need simple example tying scalar to localtime()
untested, but I think I'll get this right. :)
{ package Tie_timer; sub TIESCALAR { bless {}, shift } sub FETCH { scalar localtime } } tie $now, Tie_timer; print $now;
-- Randal L. Schwartz, Perl hacker
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Tying
by blueflashlight (Pilgrim) on Sep 25, 2001 at 09:09 UTC | |
by davorg (Chancellor) on Sep 25, 2001 at 13:22 UTC | |
by blueflashlight (Pilgrim) on Sep 26, 2001 at 08:34 UTC |
In Section
Seekers of Perl Wisdom