diff options
author | Stas Bekman <stas@stason.org> | 2002-04-20 21:06:49 +0800 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-04-20 19:09:35 +0000 |
commit | b996200f69917d5eea1fec2e192cef3b0eeae52f (patch) | |
tree | 74c1318126c93b83dafa06a0806ee2bdc7166d90 /pod | |
parent | d5822f2596ebe2ba0ef78092c1edce582de97c51 (diff) | |
download | perl-b996200f69917d5eea1fec2e192cef3b0eeae52f.tar.gz |
Re: perl@16005
Message-ID: <3CC0F769.1010705@stason.org>
(with a minor formatting nit)
p4raw-id: //depot/perl@16024
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perlfunc.pod | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 49efec64fd..705c4a6505 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -2810,7 +2810,13 @@ opens a filehandle to an anonymous temporary file. File handles can be opened to "in memory" files held in Perl scalars via: - open($fh,'>', \$variable) || .. + open($fh, '>', \$variable) || .. + +Though if you try to re-open C<STDOUT> or C<STDERR> as an "in memory" +file, you have to close it first: + + close STDOUT; + open STDOUT, '>', \$variable or die "Can't open STDOUT: $!"; Examples: |