From: Joao L. <dev...@st...> - 2006-03-16 20:58:31
|
I'm not the expert here but... I think you´re getting the function "eof()" instead of the literal 'eof' (special sequence for Expect)... Try: [ 'eof', sub { ... } ], Or [ eof => sub { ... } ], -- Joao Lopes > >If I've sent this multiple times I apologize, but I keep getting a >response from postmaster that it was rejected.... > >Greetings Oh Expectators! > >I've tracked down my unexpected end to the correct stanza and immediate >cause. Now I need some help getting around it. > >I have a fairly lengthy expect statement with this stanza at the end: > [ eof, > sub { > print "\n\nExpect EOF: Unexpected end of $spawn_method >session.\n\n"; > sleep 2; > } > ], > </quote> > >This stanza gets translated to this phrase when the program runs >(exp_internal(1)): > #9: -re `1' ></quote> > >The literal '1' matches any random 1 that comes through, making the >program think it has found an EOF. How do I get around this? > >I suppose that I could not test for EOF, but I would like to know if the >spawned program died out from under me. How are other people handling >this? Or is my syntax wrong? > >Expect 1.15 under perl 5.8.0 on linux. > >Thanks, >Kai > > >------------------------------------------------------- >This SF.Net email is sponsored by xPML, a groundbreaking scripting language >that extends applications into web and mobile media. Attend the live webcast >and join the prime developer group breaking into this new coding territory! >http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642 >_______________________________________________ >Expectperl-discuss mailing list >Exp...@li... >https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > > > > |