in reply to Re: Re: Can you tie a filehandle in your own package?
in thread Can you tie a filehandle in your own package?

It starts getting ugly:
sub rdw_open(*$;@) # need a file handle and a name, but allow more for + the 3 arg open... { my $fh = shift; if (not ref($fh) eq 'GLOB') { $fh = "*" . (caller())[0] . "::" . $fh; } { no strict; tie *{$fh}, __PACKAGE__, @_ ; } }
-- O thievish Night, Why should'st thou, but for some felonious end, In thy dark lantern thus close up the stars? --Milton