> Hello together,
> I have certain problem with the Net::Telnet () -package.
> I try to call a program on a remote server over the telnet. ( I cannot
use 
> SSH in this case! )
>

What you have shown won't compile.  Are you using 'strict' and
'warnings'?  If not you need to be.
 
> my $command = "cd /home/chris/servlist

No closing quote or semi-colon in the above.
 
> $t = new Net::Telnet (Timeout => 15,Prompt => 
> '/\[datagate\]\/KOMM\/datagate>/') or die "cannot call telnet!\n";
> 

You aren't declaring the scope of $t.

> 
>  $t->open ("komm") or die "cannot establish a connection!\n";
>  $rueck = $t->login ($username, $passwd) or die "login failed!\n";
> 
> ... so far it works. 
> But now I try this:
> 
> @ra = $t->print ( $command_1 ) or die "cannot change dir !\n";

You aren't declaring @ra. You appear to try to be running $command_1
instead of $command. Turn on 'strict' and 'warnings'.
 
>  $rs = $t->print ( "./komm-test.pl" ) or die "cannot start script!\n";
> And this doesn't work. I neither crashes down nor gives me a
error-message! 
> The return value $rs is 1 !!!! 
> ....
> $t->close ();
> 
> What did I wrong? 
> 
> Gruss Christian
> 
> P.S by the way, I can see that the script doesn't start because
"komm-test.pl 
> creates a file if it starts!
> 

Not really a good way to tell.

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to