The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!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;
  }
}