I am using Net::Telnet in my perl script to login to Network device (Huawei Media gateway). After running command I need to send "CTRL+C" character because few commands output are longer than the current screen size and for more output to be printed it is required to hit CTRL+C from key board.
I开发者_JAVA百科 tried searching net but no luck. Anybody has idea how to send this charater once it run a command.
Thanks in advance.
Regards Mahesh
Have you tried just sending character with ascii code 3?
$t->print("\x03");
I know this is an old post, but since I haven't seen anyone verify that any suggestion works, I figured I would reply.
This worked for me...
print $telnet->cmd("\x03");
Thnx.
print $telnet->cmd("\x03");
worked for me as well.
精彩评论