in reply to Translating Bash to Perl

But how do I check this?  \x1B, "[" and "A". Please help. I'm really puzzled.

Also, the bash script will not wait for the Enter key to be pressed.