Hi, I am trying to use the net::telnet module, and I keep timing out. I believe it is because I do not have the right prompt. My prompt looks like [sqa1@duke:~]$. I do not know why this doesn't work: Prompt => '/\[$::username\@$::machine\]\$$/'. Any help you can give me would be greatly appreciated.
Thanks, Daryl J. Hoyt #!/usr/local/bin/perl -w use strict; use Net::Telnet (); $::command = "p4 sync -f \$HOME/p4/eng/sqa/tools/..."; $::username = "sqa1"; $::passwd = "***"; $::machine = "sparky"; $::t = new Net::Telnet (Timeout => 30, Prompt => '/\[$::username\@$::machine\]\$$/'); $::t->open($::machine); $::t->login($::username, $::passwd); #@::lines = $::t->cmd("p4 sync -f //info.geodesic.com/eng/pe/tools/bin/..."); $::t->cmd($::command); @::lines = $::t->cmd($::command); print "<@::lines>\n"; print "\n";