Set new prompt letter for terminal when reading data : Term « System Functions « Perl






Set new prompt letter for terminal when reading data

      

use Term::ReadLine;

$term = Term::ReadLine->new("Input");

$prompt = "%";

while (($line = $term->readline($prompt)) ne 'q') {

    $term->addhistory($line);

    print "You typed: $line\n";

}

   
    
    
    
    
    
  








Related examples in the same category

1.use Term::ReadKey;
2.ReadMode('cbreak');
3.Get Terminal Size
4.Read password without displaying anything
5.use Term::ANSIColor;