my $toSend = freeze(\$command ); print length $toSend; $self->{channel}->send( $toSend ); ... my $received = $self->{channel}->receive_nb(); print length $received; my $command = thaw( $received );