I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2006-02-24 17:15:46-08 by je44ery
$object->after() not working?
With this code:
use Expect; my $exp = Expect->spawn('tn', 'pansy'); #$exp->debug(1); my $match = $exp->expect(undef, 'Username:'); if ($match) { $exp->send('joeshmoe@hoedown.com' . "\n"); print "AFTER OUTPUT = " . $exp->after() . "\n"; } $exp->soft_close();
and this input:
# tn pansy Trying... Connected to pansy.geo.company.com. Escape character is '^T'. XXX Firewall: Enter Your Intranet Credentials. Do Not Attempt To Authenticate Using FTP Username: blah Password:
Shouldn't $exp->after() equal the string "Passord:" ?
Direct Responses: 1853 | Write a response
Posted on 2006-02-25 17:46:32-08 by rgiersig in response to 1848
Re: $object->after() not working?
no, because at the time of match there is nothing after "Username:", and that's the moment that exp_after is set. The string "Password:" is printed only after the username has been sent...
Direct Responses: Write a response