Re: cannot call a process via telnet

2004-10-13 Thread Christian Stalp
I just want you to know that the solution of my problem was to change the prompt! When I call the remote bash via telnet to change the directory it expacted the old prompt which was guilty while login: Prompt => '/\[datagate\]\/KOMM\/datagate > But after changing the directory the prompt was

Re: cannot call a process via telnet

2004-10-12 Thread mgoland
- Original Message - From: Christian Stalp <[EMAIL PROTECTED]> Date: Tuesday, October 12, 2004 12:18 pm Subject: Re: cannot call a process via telnet > > > It appears from the docs that the C method can take a > timeout as > > well. I suspect adding the

Re: cannot call a process via telnet

2004-10-12 Thread Wiggins d Anconia
> > > It appears from the docs that the C method can take a timeout as > > well. I suspect adding the '&' will cause problems because the shell > > will return control to Net::Telnet and there will be no way to > > communicate with the process. Note that when you switch to include > > other argu

Re: cannot call a process via telnet

2004-10-12 Thread Christian Stalp
> It appears from the docs that the C method can take a timeout as > well. I suspect adding the '&' will cause problems because the shell > will return control to Net::Telnet and there will be no way to > communicate with the process. Note that when you switch to include > other arguments with C

Re: cannot call a process via telnet

2004-10-12 Thread Wiggins d Anconia
Please group reply so others can help and be helped, and to prevent getting (accidentally) ignored. > Okay now I tryed instead of: > $rs = $t->print ( "./komm-test.pl" ) or die "cannot execute !\n"; > > this: > > $rueck_s = $t->cmd ( "./komm-test.pl" ) or die "Kann kein Script starten!\n"; > >

Re: cannot call a process via telnet

2004-10-12 Thread Christian Stalp
Okay now I tryed instead of: $rs = $t->print ( "./komm-test.pl" ) or die "cannot execute !\n"; this: $rueck_s = $t->cmd ( "./komm-test.pl" ) or die "Kann kein Script starten!\n"; and get this message: command timed-out at Refdb.pm line 94 And this is absolutly normal because the script which is

Re: cannot call a process via telnet

2004-10-12 Thread Wiggins d Anconia
> As I expact, I just fixed the scope errors but the problem remains. > This is it: > > sub telnet_access > { > my $username = $main::username; > my $passwd = $main::passwd; Generally we want our subroutines to be passed arguments and return values. The above has avoided the scoping symptom b

Re: cannot call a process via telnet

2004-10-12 Thread Wiggins d Anconia
> > > What you have shown won't compile. Are you using 'strict' and > > 'warnings'? If not you need to be. > > > > Its not the whole file. I paste some parts of the script into the mail > ,renamed the variables in english ... but I also doesn't use strict. Maybe > this gives me a hint of what

Re: cannot call a process via telnet

2004-10-12 Thread Christian Stalp
As I expact, I just fixed the scope errors but the problem remains. This is it: sub telnet_access { my $username = $main::username; my $passwd = $main::passwd; my $command_1 = "cd /home/chris/servlist/"; my @ra; my $rs; my $t; $t = new Net::Telnet (Timeout => 15,Prompt => '/\[datagate\]\

Re: cannot call a process via telnet

2004-10-12 Thread Christian Stalp
> What you have shown won't compile. Are you using 'strict' and > 'warnings'? If not you need to be. > Its not the whole file. I paste some parts of the script into the mail ,renamed the variables in english ... but I also doesn't use strict. Maybe this gives me a hint of whats going wrong.

Re: cannot call a process via telnet

2004-10-12 Thread Wiggins d Anconia
> 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 = "c