in reply to Re^2: open undef
in thread open undef

I am not sure if this is documented as I open the file in read-mode

From open (emphasis mine):

As a special case the three-argument form with a read/write mode and the third argument being undef:
open(my $tmp, "+>", undef) or die ...
opens a filehandle to a newly created empty anonymous temporary file. (This happens under any mode, which makes +> the only useful and sensible mode to use.)

Replies are listed 'Best First'.
Re^4: open undef
by morgon (Priest) on Aug 02, 2018 at 20:40 UTC
    Thanks.

    So it IS documented, even though it the behaviour does not really make sense.

    What a relief...