Skip to content

Commit bc99771

Browse files
committed
perldelta for #22385
1 parent 471c834 commit bc99771

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

pod/perldelta.pod

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,22 @@ manager will later use a regex to expand these into links.
389389

390390
=item *
391391

392+
L<C<open>|perlfunc/open> automatically creates an anonymous temporary file when
393+
passed C<undef> as a filename:
394+
395+
open(my $fh, "+>", undef) or die ...
396+
397+
Due the way this feature was implemented, it would also trigger for
398+
non-existent elements of arrays or hashes:
399+
400+
open(my $fh, "+>", $hash{no_such_key}) or die ...
401+
# unexpectedly succeeds and creates a temp file
402+
403+
Now a temporary file is only created if a literal C<undef> is passed.
404+
[GH #22385]
405+
406+
=item *
407+
392408
Compound assignment operators return lvalues that can be further modified:
393409

394410
($x &= $y) += $z;

0 commit comments

Comments
 (0)