From: Nick Ing-Simmons Date: Wed, 28 Jul 2004 15:12:54 +0000 (+0100) Subject: Enhance the caveat in the description of tell() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=59c9df153f318eb57e9c2dabb5d780ea5b7073fa;p=p5sagit%2Fp5-mst-13.2.git Enhance the caveat in the description of tell() Subject: Re: [perl #30788] Error in documentation Message-Id: <20040728141254.3861.5@llama.ing-simmons.net> p4raw-id: //depot/perl@23184 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 8708313..9d9d0a0 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -5964,11 +5964,9 @@ tell() on pipes, fifos, and sockets usually returns -1. There is no C function. Use C for that. -Do not use tell() on a filehandle that has been opened using -sysopen(), use sysseek() for that as described above. Why? Because -sysopen() creates unbuffered, "raw", filehandles, while open() creates -buffered filehandles. sysseek() make sense only on the first kind, -tell() only makes sense on the second kind. +Do not use tell() (or other buffered I/O operations) on a file handle +that has been manipulated by sysread(), syswrite() or sysseek(). +Those functions ignore the buffering, while tell() does not. =item telldir DIRHANDLE