summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn L. Allen <allen@gateway.grumman.com>1997-02-06 10:07:28 -0500
committerChip Salzenberg <chip@atlantic.net>1997-02-11 07:29:00 +1200
commite05a3a1ec1221028251219a1d04f79135252823c (patch)
treed84ad713cc749bade2a5cdff18b131f801480dcd
parent6ea29bdc535e6af3948b9817129103dce3d27bba (diff)
downloadperl-e05a3a1ec1221028251219a1d04f79135252823c.tar.gz
return *FH pod patch
p5p-msgid: <9702061507.AA04474@gateway.grumman.com>
-rw-r--r--pod/perldata.pod2
-rw-r--r--pod/perlsub.pod2
2 files changed, 2 insertions, 2 deletions
diff --git a/pod/perldata.pod b/pod/perldata.pod
index 407a25204f..1878f4a5fa 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 c83f2da336..347d2f8c92 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