This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #126544] correct the first example in the fcntl documentation
authorTony Cook <tony@develop-help.com>
Wed, 3 Feb 2016 04:23:19 +0000 (15:23 +1100)
committerTony Cook <tony@develop-help.com>
Wed, 3 Feb 2016 04:23:19 +0000 (15:23 +1100)
pod/perlfunc.pod

index 126bcb1..5e9652e 100644 (file)
@@ -2229,7 +2229,7 @@ value returned work just like C<ioctl> below.
 For example:
 
     use Fcntl;
-    fcntl($filehandle, F_GETFL, $packed_return_buffer)
+    my $flags = fcntl($filehandle, F_GETFL, 0)
         or die "can't fcntl F_GETFL: $!";
 
 You don't have to check for C<defined> on the return from C<fcntl>.