in reply to telnet waitfor problem
Just out of idle curiousity, what happens when you perform the steps manually - in other words open your own telnet session to the target server, manually type in the commands you think you're sending via your perl script - do you see the telnet session return text matching "0 Successful"? (Apologies if I'm missing something, as I'm not familiar with Net::Telnet)
Update: I found out I have Net::Telnet installed on my local system, so a quick perusal of the docs shows:
Debugging The typical usage bug causes a time-out error because you've ma +de incorrect assumptions about what the remote side actually sends +. The easiest way to reconcile what the remote side sends with your e +xpecta- tions is to use "input_log()" or "dump_log()". "dump_log()" allows you to see the data being sent from the rem +ote side before any translation is done, while "input_log()" shows you t +he results after translation. The translation includes converting + end of line characters, removing and responding to TELNET protocol com +mands in the data stream.
Maybe $telnet->dump_log() will help you out.
--chargrill
$,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse s +plit//=>$* ){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$# +C]=$/;($#C >$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^ +$$C[$%++]}
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: telnet waitfor problem
by ultibuzz (Monk) on Apr 01, 2006 at 00:19 UTC |
In Section
Seekers of Perl Wisdom