Skip to content

Instantly share code, notes, and snippets.

@ainame
Created May 6, 2012 03:23
Show Gist options
  • Save ainame/2608217 to your computer and use it in GitHub Desktop.
Save ainame/2608217 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use warnings;
use Term::ReadLine;
use 5.10.0;
use Data::Printer;
my $term = Term::ReadLine->new('REPL');
my $prompt = '$ ';
while(defined ($_ = $term->readline($prompt))){
chomp;
say eval($_);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment