my $buffer = chr(0) x 2**16; ## Hopefully it won't return more than 64K? my status = $readdevice->Call( 2, $buffer ); ### Now check the status and if the call was successful, ### use the contents of $buffer. Though how you will know ### how much data the call actually returned is an open question?