@cmd = "cd /directory; ./exec.sh parm1 file.lst"; $ssh->capture2({tty=>1},'sudo', '-su', "$nonrootuser", '--', @cmd)