From: John L. Allen Date: Thu, 6 Feb 1997 15:07:28 +0000 (-0500) Subject: return *FH pod patch X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e05a3a1ec1221028251219a1d04f79135252823c;p=p5sagit%2Fp5-mst-13.2.git return *FH pod patch p5p-msgid: <9702061507.AA04474@gateway.grumman.com> --- diff --git a/pod/perldata.pod b/pod/perldata.pod index 407a252..1878f4a 100644 --- a/pod/perldata.pod +++ b/pod/perldata.pod @@ -539,7 +539,7 @@ This is also a way to create a local filehandle. For example: my $path = shift; local *FH; # not my! open (FH, $path) || return undef; - return \*FH; + return *FH; } $fh = newopen('/etc/passwd'); diff --git a/pod/perlsub.pod b/pod/perlsub.pod index c83f2da..347d2f8 100644 --- a/pod/perlsub.pod +++ b/pod/perlsub.pod @@ -608,7 +608,7 @@ If you're planning on generating new filehandles, you could do this: 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