14 lines
208 B
Perl
14 lines
208 B
Perl
|
use Term::ReadLine;
|
||
|
|
||
|
$term = Term::ReadLine->new("Input");
|
||
|
|
||
|
$prompt = "%";
|
||
|
|
||
|
while (($line = $term->readline($prompt)) ne 'q') {
|
||
|
|
||
|
$term->addhistory($line);
|
||
|
|
||
|
print "You typed: $line\n";
|
||
|
|
||
|
}
|