#!perl
use strict;
use warnings;
use Term::ReadLine;
print "* Hi there, to readline\n";
my $term = Term::ReadLine->new('readline');
while (1) {
my $command = $term->readline("readline: ");
if ($command eq 'ping') {
print "pong\n";
} elsif ($command eq 'quit') {
exit;
}
}