Skip to content

Commit f94185e

Browse files
committed
Reword / typo
1 parent cf18697 commit f94185e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/Language/io.pod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ L<IO::Path|/type/IO::Path> types.
1111
1212
=head1 Reading from files
1313
14-
To read in the contents of a file one could open the file via the C<open>
14+
One way to read the contents of a file is to open the file via the C<open>
1515
function with the C<:r> (read) file mode option and slurp in the contents:
1616
1717
my $fh = open "testfile", :r;
1818
my $contents = $fh.slurp-rest;
1919
$fh.close;
2020
21-
where we explicitly close the file handle using the C<close> method on the
22-
C<IO::Handle> object. This is a very traditional way of reading the
23-
contents of a file. However, we can do the same much more easily and
24-
clearly like so:
21+
Here we explicitly close the file handle using the C<close> method on the
22+
C<IO::Handle> object. This is a very traditional way of reading the
23+
contents of a file. However, the same can be done more easily and clearly
24+
like so:
2525
2626
my $contents = "testfile".IO.slurp;
2727
# or in procedural form:

0 commit comments

Comments
 (0)