John L. Allen [Thu, 6 Feb 1997 15:07:28 +0000 (10:07 -0500)]
p5p-msgid: <
9702061507.AA04474@gateway.grumman.com>
my $path = shift;
local *FH; # not my!
open (FH, $path) || return undef;
- return \*FH;
+ return *FH;
}
$fh = newopen('/etc/passwd');
sub openit {
my $name = shift;
local *FH;
- return open (FH, $path) ? \*FH : undef;
+ return open (FH, $path) ? *FH : undef;
}
Although that will actually produce a small memory leak. See the bottom