in reply to Redirect array to a socket handle
You need to somehow convert your array into a stream a bytes which can later be converted back into a copy of the original array. That process is called serialization (not redirection). Storable provides a means of doing this.
Sender:
use Storable qw( nstore_fd ); nstore_fd(\@data, $rem_socket);
Receiver:
use Storable qw( fd_retrieve ); my $data = fd_retrieve($rem_socket);
|
|---|