Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix the example of the open method
  • Loading branch information
titsuki committed May 28, 2016
1 parent ff5caf0 commit a526f32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/Type/IO.pod
Expand Up @@ -155,7 +155,7 @@ Write-related methods on the returned C<IO::Handle> object will fail in this
mode:
my $fh = open("test"); # the file "test" already exists
spurt $fh, "new text\n";
$fh.print("new text\n");
Failed to write bytes to filehandle: bad file descriptor
=item write-only mode, C<:w>
Expand All @@ -168,8 +168,8 @@ the file if it does exist, e.g.:
Read-related methods will fail in this mode:
my $fh = open("test", :w);
spurt $fh, "stuff\n";
spurt $fh, "more stuff\n";
$fh.print("stuff\n");
$fh.print("more stuff\n");
$fh.seek(0, 0); # return to the start of the file
$fh.get(); # Reading from filehandle failed: bad file descriptor
Expand Down

0 comments on commit a526f32

Please sign in to comment.