[Mastering-perl] First Peek: Tied Variables

Yitzchak Scott-Thoennes sthoenna at efn.org
Wed Feb 8 05:47:56 EST 2006


On Wed, Feb 08, 2006 at 02:42:03AM -0800, Yitzchak Scott-Thoennes wrote:
> On Tue, Feb 07, 2006 at 11:29:31PM -0600, brian d foy wrote:
> > I thought about tying just the {IO} portion of a scalar, but then I
> > need a package variable, which I think is worse than the
> > bareword. Oh well.
> 
> Need a package variable?  For what?
> 
> BTW, you can do
> 
>   tie *{$fh}
> 
> but only with 5.8.0 or later.

Err, sorry; if $fh is a globref, that should work even before 5.8.0;
it's just if $fh is an ioref that it doesn't.


More information about the Mastering-perl mailing list