Class method.
Return a new, unattached array handle.
If any arguments are given, they're sent to open()
.
Instance method. Open the array handle on a new array, pointed to by ARRAYREF. If no ARRAYREF is given, a "private" array is created to hold the file data.
Returns the self object on success, undefined on error.
Instance method. Is the array handle opened on something?
Instance method. Disassociate the array handle from its underlying array. Done automatically on destroy.
Instance method. No-op, provided for OO compatibility.
Instance method.
Return the next character, or undef if none remain.
This does a read(1)
, which is somewhat costly.
Instance method. Return the next line, or undef on end of data. Can safely be called in an array context. Currently, lines are delimited by "\n".
Instance method.
Get all remaining lines.
It will croak()
if accidentally called in a scalar context.
Instance method. Print ARGS to the underlying array.
Currently, this always causes a "seek to the end of the array" and generates a new array entry. This may change in the future.
Instance method. Read some bytes from the array. Returns the number of bytes actually read, 0 on end-of-file, undef on error.
Instance method. Write some bytes into the array.
Instance method. No-op, provided for OO compatibility.
Instance method. No-op, provided for OO compatibility.
Instance method. Clear the error and EOF flags. A no-op.
Instance method. Are we at end of file?
Instance method. Seek to a given position in the stream. Only a WHENCE of 0 (SEEK_SET) is supported.
Instance method. Return the current position in the stream, as a numeric offset.
Instance method.
Seek to a given position in the array, using the opaque getpos()
value.
Don't expect this to be a number.
Instance method. Return the current position in the array, as an opaque value. Don't expect this to be a number.
Instance method. Return a reference to the underlying array.