This file came from the "IO-stringy" Perl5 toolkit.
Copyright (c) 1996 by Eryq. All rights reserved. Copyright (c) 1999,2001 by ZeeGee Software Inc. All
rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl
itself.
Construction
new [ARGS...]
Classmethod. Return a new, unattached scalar handle. If any arguments are given, they're sent to
open().
open [SCALARREF]
Instancemethod. Open the scalar handle on a new scalar, pointed to by SCALARREF. If no SCALARREF
is given, a "private" scalar is created to hold the file data.
Returns the self object on success, undefined on error.
opened
Instancemethod. Is the scalar handle opened on something?
close
Instancemethod. Disassociate the scalar handle from its underlying scalar. Done automatically on
destroy.
Inputandoutput
flush
Instancemethod. No-op, provided for OO compatibility.
getc
Instancemethod. Return the next character, or undef if none remain.
getline
Instancemethod. Return the next line, or undef on end of string. Can safely be called in an array
context. Currently, lines are delimited by "\n".
getlines
Instancemethod. Get all remaining lines. It will croak() if accidentally called in a scalar
context.
print ARGS...
Instancemethod. Print ARGS to the underlying scalar.
Warning: this continues to always cause a seek to the end of the string, but if you perform seek()s
and tell()s, it is still safer to explicitly seek-to-end before subsequent print()s.
read BUF, NBYTES, [OFFSET]
Instancemethod. Read some bytes from the scalar. Returns the number of bytes actually read, 0 on
end-of-file, undef on error.
write BUF, NBYTES, [OFFSET]
Instancemethod. Write some bytes to the scalar.
sysread BUF, LEN, [OFFSET]
Instancemethod. Read some bytes from the scalar. Returns the number of bytes actually read, 0 on
end-of-file, undef on error.
syswrite BUF, NBYTES, [OFFSET]
Instancemethod. Write some bytes to the scalar.
Seeking/tellingandotherattributes
autoflush
Instancemethod. No-op, provided for OO compatibility.
binmode
Instancemethod. No-op, provided for OO compatibility.
clearerr
Instancemethod. Clear the error and EOF flags. A no-op.
eof Instancemethod. Are we at end of file?
seek OFFSET, WHENCE
Instancemethod. Seek to a given position in the stream.
sysseek OFFSET, WHENCE
Instancemethod. Identical to "seek OFFSET, WHENCE", q.v.
tell
Instancemethod. Return the current position in the stream, as a numeric offset.
use_RS [YESNO]
Instancemethod.Deprecatedandignored. Obey the current setting of $/, like IO::Handle does?
Default is false in 1.x, but cold-welded true in 2.x and later.
setpos POS
Instancemethod. Set the current position, using the opaque value returned by "getpos()".
getpos
Instancemethod. Return the current position in the string, as an opaque object.
sref
Instancemethod. Return a reference to the underlying scalar.