> I am using the telnet module (Telnet.pm) in order to automate some
> unix-sessions.
> It works so far great, but during the telnet session I would like to
> send the escape character ("Ctrl ]") to the remote system.
> How shall I encode "Ctrl ]"?
There is no need to encode it in any special way.
I suspect you are confused. The Ctrl-] character is not special in
the telnet connection.
The Ctrl-] character is special in the stream between a controlling
terminal and the Unix telent program. But you are not using the Unix
telnet program.

Signature
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
SebMuller - 27 Aug 2003 07:45 GMT
> > I am using the telnet module (Telnet.pm) in order to automate some
> > unix-sessions.
[quoted text clipped - 10 lines]
> terminal and the Unix telent program. But you are not using the Unix
> telnet program.
You are absolutely right. Actually the question is: What has to be
send to make the remote system (Unix) execute the command Ctrl-A or
Ctrl-C etc.
Because $t->cmd("Ctrl-A") won't do it (see below).
Perhaps ASCII code?
----------------------------------------------------------------
use Net::Telnet();
$t = new Net::Telnet (-timeout => 10, -prompt => '/$prompt $/');
...
@lines = $t->cmd("Ctrl-A");
----------------------------------------------------------------