From: Stas Bekman Date: Sat, 20 Apr 2002 13:06:49 +0000 (+0800) Subject: Re: perl@16005 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b996200f69917d5eea1fec2e192cef3b0eeae52f;p=p5sagit%2Fp5-mst-13.2.git Re: perl@16005 Message-ID: <3CC0F769.1010705@stason.org> (with a minor formatting nit) p4raw-id: //depot/perl@16024 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 49efec6..705c4a6 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 or C as an "in memory" +file, you have to close it first: + + close STDOUT; + open STDOUT, '>', \$variable or die "Can't open STDOUT: $!"; Examples: