简体   繁体   中英

Perl Net::Telnet sending CTRL+C

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 tried searching net but no luck. Anybody has idea how to send this charater once it run a command.

Thanks in advance.

Regards Mahesh

您是否尝试过仅发送带有ASCII码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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM