$ssh->system({ stdin_file => 'script1.tcsh' }, 'tcsh') or die "Remote command failed: " . $ssh->error;