Term-Readline

Term::ReadLine(3p) Perl Programmers Reference Guide Term::ReadLine(3p)

Term-Readline

Term::ReadLine(3p) Perl Programmers Reference Guide Term::ReadLine(3p) # Term::ReadLine(3p) Perl Programmers Reference Guide Term::ReadLine(3p) NNAAMMEE # Term::ReadLine - Perl interface to various "readline" packages. If no real package is found, substitutes stubs instead of basic functions. SSYYNNOOPPSSIISS # use Term::ReadLine; my $term = Term::ReadLine->new('Simple Perl calc'); my $prompt = "Enter your arithmetic expression: "; my $OUT = $term->OUT || \*STDOUT; while ( defined ($_ = $term->readline($prompt)) ) { my $res = eval($_); warn $@ if $@; print $OUT $res, "\n" unless $@; $term->addhistory($_) if /\S/; } DDEESSCCRRIIPPTTIIOONN # This package is just a front end to some other packages. ...