Skip to content

Instantly share code, notes, and snippets.

View lezsakdomi's full-sized avatar

Lezsák Domonkos lezsakdomi

View GitHub Profile
@asimjalis
asimjalis / perl-shell.md
Created December 8, 2012 15:34
How to run Perl in an interactive shell

How to run Perl in an interactive shell

by Asim Jalis, MetaProse.com

An interactive shell is useful for quickly trying out different commands. While Ruby, Python, and Clojure come with interactive shells, Perl does not. However, it is easy to create one using this one-liner on Unix systems:

perl -e 'do{print("perl> ");$_x=<>;chomp $_x;print(eval($_x)."\n")}while($_x ne "q")'