It seems to me that you may have ANSI escape characters in your prompt. Perhaps this is used for highlighting parts of the prompt on an appropriate device.
Either turn off the fancy stuff on the remote side, have the remote side id your script and turn them off for you, or include the fancy characters as an alternation in your prompt string - \xFF (see perlre).
--MidLifeXis
In reply to Re: Odd characters in Telnet prompt
by MidLifeXis
in thread Odd characters in Telnet prompt
by bih71
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |