develooper Front page | perl.perl5.porters | Postings from March 2000

Re: What's left to do? [LONG]

Thread Previous | Thread Next
From:
rspier
Date:
March 22, 2000 20:04
Subject:
Re: What's left to do? [LONG]
Message ID:
14553.38872.981137.976952@dell.rls.cx
>>>>> "TH" == Tom Hughes <tom@compton.nu> writes:
>> ># perfect a Perl version of expect
>> >Work with IO::Tty and put these in core replacing Comm.pl >Is this
>> really what we want/need?
>> There's an Expect.pm you know.
TH> It has a truly horrid interface though.

The Expect.pm interface is similar to TCL's Expect interface (which I
have never used.), and while it takes a while to get used to it, and
the documentation is spread out through a few different files and
examples, it's not ``horrid''

But I've found that the interface is very easy to use in the simple
cases, and usable in more difficult cases.

    A trivial case would look like this:  (no error checking)

    use Expect;
    $e =  Expect->spawn("/bin/passwd");
    $e->expect(30,"Enter a new password:");
    print $e "$newpassword\n";

-R


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About