http://www.perlmonks.org?node_id=395902


in reply to net::telnet waitfor $'

You have to use  @lines = $telnet->cmd(String=>$command, [Output=>$ref,] [Prompt=>$pattern,] [Timeout=>$timeout,] [Cmd_remove_mode=>$mode] @lines array will have the output of the command.