in reply to Expect, STDout, and formating

if you want to capture stdout of the spawned process, then your expect object (I believe) is a filehandle. therefore @array=<$exp_object> should work, as should $scalar=<$exp_object> Sorry, but I can't test this for you as this machine is not allowed to have additional modules installed. what does work for sure, and if you really don't need any of the expect module functionality, is to open the program as a pipe, eg
open(MYPROG,"| /bin/sh") or die;
$scalar=<MYPROG>;