programming-examples/perl/SystemFunction/Set new prompt letter for terminal when reading data.pl

14 lines
208 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
use Term::ReadLine;
$term = Term::ReadLine->new("Input");
$prompt = "%";
while (($line = $term->readline($prompt)) ne 'q') {
$term->addhistory($line);
print "You typed: $line\n";
}