in reply to Can you tie a filehandle in your own package?
sub rdw_open(*$;@) # need a file handle and a name, but allow more fo +r the 3 arg open... { my $fh = shift; tie *{$fh}, __PACKAGE__, @_ ; }
-- O thievish Night, Why should'st thou, but for some felonious end, In thy dark lantern thus close up the stars? --Miltonrdw_open(*FH, "myfile") or die "Couldn't open myfile: $!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Can you tie a filehandle in your own package?
by thor (Priest) on Mar 01, 2002 at 20:46 UTC | |
by Felonious (Chaplain) on Mar 02, 2002 at 00:06 UTC |