Hi Monks!
I am trying to pass a two-dimensional array through a Win32::Pipe. This basically means that I need to convert the array to a string to "write" and then unconvert it to "read". To cut down on I/O through the pipe, I'd like to do this without having to use a "for" loop on either end.
A one dimensional array is encoded like this:
$Pipe->Write( join( "\0", @Array) );
And decoded like this:
@Array = split( "\0", $Pipe->Read() );
I've tried lots of different ways to encode/decode a two-dimensional array with no success. These have included:
1) Using multiple joins and splits (I end up passing a string like "ARRAY(0x20e301c)"
2) Using a number of variations on map (including one that used pack/unpack) and either got the string in (1) or nothing.
Please help!
In reply to Joining and splitting two dimensional arrays by bfish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |