The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!perl
use strict;
use warnings;
$| = 1;

print "* Hi there, to read\n";

while (1) {
  print "read: ";
  my $command = <>;
  chomp $command;

  if ($command eq 'ping') {
    print "pong\n";
  } elsif ($command eq 'quit') {
    exit;
  }
}