in reply to IBM scan codes (pgup, pgdn, arrow keys)

Try a slash in front of each pair of hex digits. e.g. \r\n = \10\12. I think that's what you want. Oh, and you'll be needing a comma in here somewhere  $exp "\0402"

And you should probalby use $exp->send or $exp->send_slow to send chars to your trapped program. Those printed characters will be displayed to you, not sent to the program, I think (haven't checked).

____________________
Jeremy
I didn't believe in evil until I dated it.