Skip to content

Commit f4cd255

Browse files
Mention importance of closing handles in 5to6
1 parent f7c9224 commit f4cd255

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/Language/5to6-perlfunc.pod6

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,8 @@ only, read-write, and append, you would use C<:w>, C<:rw>, and C<:a>
919919
respectively. There are also options for encoding and how the filehandle
920920
deals with newlines. Details L<here|/routine/open>.
921921
922+
Another important change is that filehandles don't get automatically closed on scope exit. It's possible to remember to call C<close> at the right time, but the recommended idiom is to write a C<LEAVE> block with the closing intructions right after opening the file.
923+
922924
=head2 opendir
923925
924926
=item opendir DIRHANDLE, EXPR

0 commit comments

Comments
 (0)