reads a serialized scalar back from the specified handle
$handle - the handle to read from (defaults to stdin/stdout)
the scalar read back in from the handle. $null is returned in the event there is any trouble.
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)