in reply to CMD Command

# # Wait for prompt - "(1)>>" # $t->prompt('/\(\1\)\>\>\s*$/');

That comment doesn't match the code. You are too eager in your backwacking. Try:

$t -> prompt ('/[(]1[)]>>\s*$/');

I don't know whether that will fix your problem, but it's a start.

Abigail