Mega Code Archive

 
Categories / Perl / System Functions
 

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"; }