|
From: Roland G. <Rol...@al...> - 2000-11-27 15:00:03
|
John Stumbles wrote:
> Hmmm, this example doesn't seem to work in 1.10 (though I had something
> similar working OK in 1.08)
>
> > How to automate login
>
> $obj->expect($timeout,
> [
> qr'login: $',
> sub {
> my $fh = shift;
> print $fh "$username\r"; exp_continue;
> }
> ],
> [
> 'Password: $',
> sub {
> my $fh = shift;
> print $fh "$password\r"; exp_continue;
> }
> ],
> [
> timeout =>
> sub {
> die "No login.\n";
> }
> ],
> '-re', qr'[#>:] $', #' wait for shell prompt, then exit expect
> );
>
> Problem is, it doesn't exit after getting the shell prompt.
Ah, yes, fixed one bug and introduced another... does this sound familiar?
OK, I guess I have fixed that one now, find a new version
attached, which I will release next week (if no other bugs
creep up).
Cheers,
Roland
--
RGi...@cp... |