One issue for now, there might be more: in this regular expression: qr/Enter pack name \(or q\) \[q\]: \(q\)\\s+/ you've got "\\s+", which matches a literal backslash followed by one or more times the letter "s". I'm guessing you only want to have one backslash there in order to match one or more whitespace characters.
Otherwise, try setting $exp->exp_internal(1);, $exp->debug(1);, or $exp->debug(2); to see what else might be going wrong.
In reply to Re: Need help on expect
by Anonymous Monk
in thread Need help on expect
by toaravind
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |