From: Kai H. <kai...@al...> - 2006-03-16 22:39:40
|
=20 <scratch head> I thought =3D> was a synonym for a comma. Your example = shows them to be different. <shrug> Might as well try it. <clickety> = There, quotes around 'eof'....=20 Hey! It works! <Thump of Programming Perl hitting the desk> <page flip> Operators.... = <pages flip> ... Comma Operators.... "The =3D> diagraph ... also forces = any identifier to the left of it to be interpreted as a string." Aah.... <chuckle> Light dawns. Thank you Joao, you are exactly correct. - Kai > -----Original Message----- > From: Joao Lopes [mailto:dev...@st...]=20 > Sent: Thursday, March 16, 2006 1:58 PM > To: Kai Hintze > Cc: exp...@li... > Subject: Re: [Expectperl-discuss] eof becomes 1 >=20 > I'm not the expert here but... I think you=B4re getting the function=20 > "eof()" instead of the literal 'eof' (special sequence for Expect)... > Try: > [ 'eof', sub { ... } ], > Or > [ eof =3D> sub { ... } ], >=20 > -- > Joao Lopes >=20 > >=20 > >If I've sent this multiple times I apologize, but I keep getting a > >response from postmaster that it was rejected.... > > > >Greetings Oh Expectators! > >=20 > >I've tracked down my unexpected end to the correct stanza=20 > and immediate > >cause. Now I need some help getting around it. > >=20 > >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> > >=20 > >This stanza gets translated to this phrase when the program runs > >(exp_internal(1)): > > #9: -re `1' > ></quote> > >=20 > >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? > >=20 > >I suppose that I could not test for EOF, but I would like to=20 > know if the > >spawned program died out from under me. How are other people handling > >this? Or is my syntax wrong? > >=20 > >Expect 1.15 under perl 5.8.0 on linux. > >=20 > >Thanks, > >Kai > > > > > >------------------------------------------------------- > >This SF.Net email is sponsored by xPML, a groundbreaking=20 > scripting language > >that extends applications into web and mobile media. Attend=20 > the live webcast > >and join the prime developer group breaking into this new=20 > coding territory! > = >http://sel.as-us.falkag.net/sel?cmd=3Dk&kid=110944&bid$1720&dat=121642 > >_______________________________________________ > >Expectperl-discuss mailing list > >Exp...@li... > >https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > > > > > > =20 > > >=20 >=20 |