Robert's Perl Tutorial

http://www.sthomas.net/roberts-perl-tutorial.htm


A short example

You'll have noticed Perl packs a lot of power into a small amount of code. You can feed Perl code directly on the command line. This is known as a oneliner, for obvious reasons. An example:

perl -e"for (55..75) { print chr($_) }"

The -e switch tells Perl that a command is following. The command must be enclosed in doublequotes, not singles as on Unix. The command itself in this case simply prints the ASCII code for the number 55 to 75 inclusive.