X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperldelta.pod;h=47a9eb13c50aec55683153513ce22705d4a32bc0;hb=2c8ac474a00b933b4d84e8567b4b6db1293ad0ef;hp=12d26841a1e31302e8a3f8753837e8528afa48e1;hpb=951ba7fe8dad4074b389cb34ee7e8b446c17c0fb;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 12d2684..47a9eb1 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -360,11 +360,14 @@ The length argument of C has become optional. =head2 Filehandles can be autovivified -The construct C can be used to create filehandles -more easily. The filehandle will be automatically closed at the end -of the scope of $fh, provided there are no other references to it. This -largely eliminates the need for typeglobs when opening filehandles -that must be passed around, as in the following example: +Similar to how constructs such as C<$x->[0]> autovivify a reference, +open() now autovivifies a filehandle if the first argument is an +uninitialized variable. This allows the constructs C and +C to be used to create filehandles that will +conveniently be closed automatically when the scope ends, provided there +are no other references to them. This largely eliminates the need for +typeglobs when opening filehandles that must be passed around, as in the +following example: sub myopen { open my $fh, "@_"