Click here to get back home

How to open temporary with Perl 5.6?

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
How to open temporary with Perl 5.6? Thomas Dorner 09-24-2007
Posted by Thomas Dorner on September 24, 2007, 12:28 pm
Please log in for more thread options
Hi,

in the test suite of one of my modules I use

open TMP, '+>', undef or die ...

to open a temporary file which is more or less as it is documented in
my Perl 5.8.8 documentation:

> As a special case the 3-arg form with a read/write mode and the
> third argument being "undef":
>
> open(TMP, "+>", undef) or die ...
>
> opens a filehandle to an anonymous temporary file.

Now I received my first test error from the CPAN testers for that
statement:
> Use of uninitialized value in open at t/Parse-Readelf.t line 45.

The tester runs Perl 5.6.2, so I suppose the temporary functionality
was added later. Now my questions would be:
Which Perl version added the special temporary syntax?
Is there some other portable easy-to-use construct to open a temporary
file with Perl versions 5.6.1 or later?

Regards, Thomas
--
Address is not read, Reply-To address is only valid for two months!

Similar ThreadsPosted
Net::Telnet retrieving temporary text problem November 6, 2006, 3:32 am
CGI open of tmpfile: No such file or directory March 25, 2008, 6:00 am
ANNOUNCE: OpenOffice-OODoc for Open Document format August 15, 2005, 9:39 pm
Software Development Engineers needed - open source enviro - Seattle December 10, 2004, 3:38 pm
ANNOUNCE: Initial release of WSF/Perl (Perl bindings for a WS-* framework) October 4, 2007, 1:37 am
PLJava - Perl embeded into Java (calling Perl from Java) - 1sr release - call for tests and review, please. July 13, 2004, 4:06 am
Perl MakeMaker - how to force Perl linking with the static C library (libcrt.lib) instead of dynamic C library (msvcrt.lib) April 17, 2007, 5:22 pm
MFC with Perl July 19, 2005, 9:38 pm
Net::SSH::Perl October 23, 2005, 11:16 pm
perl with ASP November 9, 2005, 10:19 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap