in reply to Re: Tying
in thread Need simple example tying scalar to localtime()
#!/usr/bin/perl -w use strict; use Tie::Scalar; package Tie_timer; sub TIESCALAR { bless {}, shift } sub FETCH { scalar localtime } package main; my $now; tie ($now, "Tie_timer"); print "$now\n"; sleep 5; print "$now\n"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Tying
by davorg (Chancellor) on Sep 25, 2001 at 13:22 UTC | |
by blueflashlight (Pilgrim) on Sep 26, 2001 at 08:34 UTC |