░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
vps.doorgans.com
LOCATION:
/usr/share/doc/perl-Expect/examples
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: expect_calc.pl
use strict; use warnings; use Expect; my $e = Expect->new; $e->spawn($^X, "examples/calc.pl") or die; $e->log_stdout(0); $e->raw_pty(1); $e->send("19+23\n"); $e->expect(1, "19+23"); print 'Match: <', $e->match, ">\n"; print 'Before: <', $e->before, ">\n"; print 'After: <', $e->after, ">\n"; $e->clear_accum; $e->expect(1, '-re' => qr/'\d+'/); print 'Match: <', $e->match, ">\n"; print 'Before: <', $e->before, ">\n"; print 'After: <', $e->after, ">\n"; $e->close;
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📁 kibitz/
DIR
—
2024-10-01 05:36
📄 calc.pl
PL
141 B
2017-05-15 15:55
EDIT
📄 expect_calc.pl
PL
470 B
2017-05-15 15:55
EDIT
📄 ssh.pl
PL
1.9 KB
2017-05-15 15:55
EDIT