Interacting with Perl

terp.pl
Copy and paste the code from the text area below to terp.pl

I used the code above when I was first learning Perl to test snippets of Perl code interactively. G'head ... try it. From a command prompt ( or shell prompt ) type:
    perl terp.pl

You should then see a weird little prompt:
    ->

At the prompt type the following:
    $x=4*7;
    print $x;

You should see instant results.

This can be very handy for tinkering with regex's and such. I had meant to build in a command-history, but never got around to it.


Back to Jimbo's Demented Software

Back to Jimbo's Home Page