in reply to Open with 'undef' filename.

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

I believe the term "anonymous temporary file" is related to this on *nix. I know nothing more about that.

On Windows it creates a very ordinary file in the users home directory with a name of plx????.tmp where ???? are 4 hex digits. And those files are automatically delete when the process ends.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: Open with 'undef' filename.
by james28909 (Deacon) on Nov 07, 2016 at 00:23 UTC

    Thanks for the explanation.