The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#! /usr/bin/env perl

use Statistics::RserveClient::Connection;

$cnx = new Statistics::RserveClient::Connection('localhost');
Statistics::RserveClient::Connection->init();

my $EOF = 0;
my @result = undef;

while (!$EOF) {
  print "> ";
  $input = <>;
  chomp $input;

  if ($input eq "quit") {
    print "exiting...\n";
    exit 0;
  }
  else {
    print "evaluating $input\n";
    @result = $cnx->evalString($input);
    print "[" . join (", ", @result) . "]\n";
  }
}