summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorAnton Berezin <tobez@tobez.org>1998-10-16 21:22:41 +0200
committerGurusamy Sarathy <gsar@cpan.org>1998-10-25 05:11:03 +0000
commitb43ceaf2b133015285f3b5980eae328febf9da1d (patch)
tree9c1b3668269474a248c36577115daf25585f7add /pod
parente3fdf9887934783dd5692982e11c048eb7c97265 (diff)
downloadperl-b43ceaf2b133015285f3b5980eae328febf9da1d.tar.gz
include eof() in description of buffering caveats
Message-Id: <199810161722.TAA28813@lion.plab.ku.dk> Subject: [DOCPATCH] pod/perlfunc.pod p4raw-id: //depot/perl@2055
Diffstat (limited to 'pod')
-rw-r--r--pod/perlfunc.pod37
1 files changed, 19 insertions, 18 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index c23aa140ba..4f4568aefa 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -3909,12 +3909,13 @@ into that kind of thing.
=item sysread FILEHANDLE,SCALAR,LENGTH
Attempts to read LENGTH bytes of data into variable SCALAR from the
-specified FILEHANDLE, using the system call read(2). It bypasses
-stdio, so mixing this with other kinds of reads, C<print()>, C<write()>,
-C<seek()>, or C<tell()> can cause confusion because stdio usually buffers
-data. Returns the number of bytes actually read, C<0> at end of file,
-or undef if there was an error. SCALAR will be grown or shrunk so that
-the last byte actually read is the last byte of the scalar after the read.
+specified FILEHANDLE, using the system call read(2). It bypasses stdio,
+so mixing this with other kinds of reads, C<print()>, C<write()>,
+C<seek()>, C<tell()>, or C<eof()> can cause confusion because stdio
+usually buffers data. Returns the number of bytes actually read, C<0>
+at end of file, or undef if there was an error. SCALAR will be grown or
+shrunk so that the last byte actually read is the last byte of the
+scalar after the read.
An OFFSET may be specified to place the read data at some place in the
string other than the beginning. A negative OFFSET specifies
@@ -3927,13 +3928,13 @@ the result of the read is appended.
Sets FILEHANDLE's system position using the system call lseek(2). It
bypasses stdio, so mixing this with reads (other than C<sysread()>),
-C<print()>, C<write()>, C<seek()>, or C<tell()> may cause confusion. FILEHANDLE may
-be an expression whose value gives the name of the filehandle. The
-values for WHENCE are C<0> to set the new position to POSITION, C<1> to set
-the it to the current position plus POSITION, and C<2> to set it to EOF
-plus POSITION (typically negative). For WHENCE, you may use the
-constants C<SEEK_SET>, C<SEEK_CUR>, and C<SEEK_END> from either the C<IO::Seekable>
-or the POSIX module.
+C<print()>, C<write()>, C<seek()>, C<tell()>, or C<eof()> may cause
+confusion. FILEHANDLE may be an expression whose value gives the name
+of the filehandle. The values for WHENCE are C<0> to set the new
+position to POSITION, C<1> to set the it to the current position plus
+POSITION, and C<2> to set it to EOF plus POSITION (typically negative).
+For WHENCE, you may use the constants C<SEEK_SET>, C<SEEK_CUR>, and
+C<SEEK_END> from either the C<IO::Seekable> or the POSIX module.
Returns the new position, or the undefined value on failure. A position
of zero is returned as the string "C<0> but true"; thus C<sysseek()> returns
@@ -3994,11 +3995,11 @@ Attempts to write LENGTH bytes of data from variable SCALAR to the
specified FILEHANDLE, using the system call write(2). If LENGTH is
not specified, writes whole SCALAR. It bypasses
stdio, so mixing this with reads (other than C<sysread())>, C<print()>,
-C<write()>, C<seek()>, or C<tell()> may cause confusion because stdio usually
-buffers data. Returns the number of bytes actually written, or C<undef>
-if there was an error. If the LENGTH is greater than the available
-data in the SCALAR after the OFFSET, only as much data as is available
-will be written.
+C<write()>, C<seek()>, C<tell()>, or C<eof()> may cause confusion
+because stdio usually buffers data. Returns the number of bytes
+actually written, or C<undef> if there was an error. If the LENGTH is
+greater than the available data in the SCALAR after the OFFSET, only as
+much data as is available will be written.
An OFFSET may be specified to write the data from some part of the
string other than the beginning. A negative OFFSET specifies writing