Welcome to POLECAT

Perl One-Liner Eclectic CATalog

Oneliner n.
1. An entire Perl program that can be either written in one line, or typed in its entirety at the command line. Often seen in email signatures. See JAPH
2. One line of Perl code that contains an impressive amount of functionality.


What's here

How to use these

If a one-liner is preceeded with the word 'perl', this means that exacrly what you see there can be typed at the command line. If it is not, then you can copy and paste it into your Perl code, or, in most cases, you can probably run it at the command line by typing
    perl -e 'code goes here'

How to submit one-liners

Please feel free to submit one-liners directly to me at mjd-perl-oneliners+@plover.com. Please try to include adequate explanation of what is going on that a beginner can readily understand. This site is trying to be educational, as well as entertaining.

You are also encouraged to explicitly release your code under the Artistic License, so that there is no confusion as to whether the code can be reused.