in reply to Can't get cmd_remove_mode to work in Net::Telnet
According to the docs, $t->cmd_remove_mode(1) removes one line to be echoed. Is it possible the remote host is returning 2 lines, the first of which you are correctly suppressing but the second line is still echoed? Could you try setting cmd_remove_mode to 2 to see if that makes any difference?
$t->cmd_remove_mode(2); # so that we suppress two lines my @distro = $t->cmd(String => "cat /etc/redhat-release");
Also, check out the possibility of using option_accept()
--
vek
--
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Can't get cmd_remove_mode to work in Net::Telnet
by gctaylor1 (Hermit) on Jan 15, 2009 at 21:44 UTC | |
by leriksen (Curate) on Jan 15, 2009 at 23:11 UTC |
In Section
Seekers of Perl Wisdom