From: Sascha G. (02838) <Sas...@al...> - 2003-04-22 13:37:14
|
Chris Snyder wrote: > A copy and paste of your code, replacing the: > $mtnm->spawn("csteMTNM -c"); > with: > $mtnm->spawn("ls"); > seems to indicate success. > > Are you sure your Expect install is kosher? > Chris I did not install Expect cause i have no root privilegs. I use it locally but the test.pl and also my script worked until now. If i modify my code this way: sub start { $mtnm = new Expect; # $mtnm->raw_pty(1); $mtnm->spawn("csteMTNM -c"); $mtnm->log_file("rmtest.log", "w"); $mtnm->expect(30, "STARTUP FINISHED\r\n"); } I get the following error message: Can't locate object method "_init_vars" via package "Expect=GLOB(0x109088)" at /tools/perl-5.6.0/lib/site_perl/5.6.0/Expect.pm line 93. Cannot exec `': Maybe it is all about the Expect installation like you mentioned. I think it is weired that $var = new Expect; $var->spawn("ls"); does not work but $var = Expect->spawn("ls); does work for me. |