writeObject

Synopsis

writeObject([$handle], $scalar, ...)

serializes and writes all of the scalar arguments out to the specified handle

Parameters

$handle - the handle to write to (defaults to stdin/stdout)

$scalar - a scalar to serialize into bytes

... - any number of the scalars can be specified

Side Effects / Notes

Examples

sub a { @data = @("a", "b", "c"); writeObject($source, @data); @stuff = @(1, 2, 3); writeObject($source, @stuff); } $handle = fork(&a); @a = readObject($handle); println("Read array: " . @a); @b = readObject($handle); println("Read array: " . @b);

Read array: @('a', 'b', 'c') Read array: @(1, 2, 3)

See Also