LPM: Expect-like functionality without "use"ing Expect

Steve Lane sml at zfx.com
Wed Apr 26 14:23:42 CDT 2000


why don't you just install Expect.pm in your home dir?

or look for the ancient "chat2.pl" program, which makes for
some interesting reading even if you don't use it...

AARON B. DOSSETT wrote:
> I'm in a bit of a bind.  I need to have some Expect-like functionality in a
> perl script on a system that a) doesn't have Expect installed and b) doesn't
> have the Perl Expect module installed.  I only want a very small bit of
> Expect functionality.  I need to capture output from a command executed with
> "sudo" which may or may not prompt me for a password.  Any suggestions on how
> to do this with just the perl core (5.004_04) ?
--
Steve Lane <sml at zfx.com>



More information about the Lexington-pm mailing list