Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # perl cookbook ch15.12
- # this is a revised version.
- use strict;
- use warnings;
- use Term::ReadLine;
- my $predefined_cmd = q[ls -all ~];
- my $term = Term::ReadLine->new("APP DESCRIPTION");
- my $OUT = $term->OUT || *STDOUT;
- $term->addhistory($predefined_cmd);
- my $cmd = $term->readline("Use ARROW KEY to access predefined CMD\n> ");
- print {$OUT} qx/$cmd/ ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement