use Term::ReadLine; my $cli = Term::ReadLine->new; if ($^O eq "MSWin32" || $^O eq "dos") { my $INPUT; open($INPUT, "<con") and $cli->newTTY($INPUT, $cli->OUT); } my $line1 = $cli->readline; my $line2 = $cli->readline; # hit up arrow for line1 history use Data::Dumper; print Dumper $line1, $line2;
In reply to Re^2: Simulating Command Line History in Perl
by repellent
in thread Simulating Command Line History in Perl
by Only1KW
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |