On Mon, Aug 20, 2018 at 01:31:26PM +1000, Craig Sanders wrote: > Perl has several to choose from - the most generic is Expect.pm[1]. There's > also application-specific ones like Device::SerialPort[2]. or for specific > network protocols with, e.g., Net::SSH[3] and Net::Telnet[4]. > > Device::SerialPort has some basic expect-like functionality built in (e.g. the > "lookfor" method), or can be used with Expect.pm.
Another one worth looking at is Net::CLI::Interact https://metacpan.org/release/Net-CLI-Interact Don't be fooled by the Net:: prefix, it works for serial connections too - the tutorial says: Introduction Automating command line interface (CLI) interactions is not a new idea, but can be tricky to implement. Net::CLI::Interact aims to provide a simple and manageable interface to CLI interactions, supporting: * SSH, Telnet and Serial-Line connections * Unix and Windows support * Reusable device command phrasebooks The module exists to support developers of applications and libraries which must interact with a command line interface. The SYNOPSIS section of Net::CLI::Interact has an overview of the commands demonstrated in this document. This has sub-modules for dealing with specific hardware vendors and models (e.g. cisco) craig -- craig sanders <c...@taz.net.au> _______________________________________________ luv-main mailing list luv-main@luv.asn.au https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main