Why not check the return value of spawn?
$test=Expect->spawn("/bin/sh") || die "Can't spawn /bin/sh:$!";
On a side note, shell prompts are completely configurable, they can go from:
#
to
[ user@host: 10:15pm: 12 ] ~/docs >
You'll need to be more specific as what you think the prompts will look like to generate a better regex.
HTH
In reply to Re: reg ex and the prompt
by pzbagel
in thread reg ex and the prompt
by jcpunk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |