in reply to Terminal Client
On a separate note, if you are connecting to a telnet daemon, you should probably use Net::Telnet
Use the hex or oct built-in functions...
$ perl -wE 'print hex "02"' | od -a 0000000 2 0000001 $ [download]
$ perl -wE 'print pack "H*", "02"' | od -a 0000000 stx 0000001 [download]