I like your approach and I think this is what you meant:
$MySocket->send("\x02");This seems the most straightforward to me. I have a personal preference of hex over octal.
Update: Oops. At first I only saw JavaFan's pack approach in the reply below this. Be he already covered this approach too. Sorry for duplicates.
In reply to Re^2: Terminal Client
by juster
in thread Terminal Client
by cstrong
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |