Perl
Perl, also Practical Extraction and Report Language (a backronym, see below), is an interpreted procedural programming language designed by Larry Wall. Perl borrows features from C, shell scripting (sh), awk, sed, and (to a lesser extent) many other programming languages.
Fun with Perl
As with C, obfuscated code competitions are a popular feature of Perl culture. The annual Obfuscated Perl contest makes an arch virtue of Perl's syntactic flexibility. The following program prints the text "Just another Perl / Unix hacker", using 32 concurrent processes coordinated by pipes. A complete explanation is available on the author's Web site.
Related Topics:
Obfuscated code - Obfuscated Perl contest - Syntactic
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
@P=split//,".URRUUc8R";@d=split//," rekcah xinU / lreP rehtona tsuJ";sub p{
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^/&&
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
close$_}%p;wait until$?;map{/^r/&&}%p;$_=$d;sleep rand(2)if/S/;print
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Similar to obfuscated code but with a different purpose, Perl Poetry is the practice of writing poems that can actually be compiled by perl. This hobby is more or less unique to Perl due to the large number of regular English words used in the language. New poems are regularly published in the Perl Monks site's Perl Poetry section.
Related Topics:
Poetry - Perl Monks
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Another popular pastime is Perl golf. As with the physical sport the goal is to reduce the number of strokes that it takes to complete a particular objective, but here "strokes" refers to keystrokes rather than swings of a golf club. A task, such as "scan an input string and return the longest palindrome that it contains", is proposed and participants try to outdo each other by writing solutions that require fewer and fewer characters of Perl source code.
Related Topics:
The physical sport - Palindrome
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Another tradition among Perl hackers is writing JAPHs, which are short obfuscated programs that print out the phrase "Just another Perl hacker,". The "canonical" JAPH includes the comma at the end, although this is often omitted, and many variants on the theme have been created (example: http://www.perlmonks.org/index.pl?node_id=292135, which prints "Just Another Perl Pirate!").
Related Topics:
Hacker - Just another Perl hacker
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
One interesting Perl module is Lingua::Romana::Perligata. This module translates the source code of a script that uses it from Latin into Perl, allowing the programmer to write executable programs in Latin.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
The Perl community has set aside the "Acme" namespace for modules that are fun or experimental in nature. Some of the Acme modules are deliberately implemented in amusing ways. Some examples:
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
- Acme::Hello simplifies the process of writing a "Hello, World!" program
- Acme::Currency allows you to change the "$" prefix for scalar variables to some other character
- Acme::ProgressBar is a horribly inefficient way to indicate progress for a task
- Acme::VerySign satirizes the widely-criticized VeriSign Site Finder service
- Acme::Don't implements the logical opposite of the do keyword—don't, which does not execute the provided block.
- Perl humour on wikibooks
- Larry Wall quotes
- Lingua::Romana::Perligata - Write Perl in Latin!
- A tutorial on Perligata
- Perl Purity Test
See also
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ Table of Content ~
| ► | Introduction |
| ► | Overview |
| ► | Language structure |
| ► | Language design |
| ► | Opinion |
| ► | History |
| ► | CPAN |
| ► | Name |
| ► | Fun with Perl |
| ► | See also |
| ► | External links |
| ► | Books |
| ► | References |
~ What's Hot ~
~ Community ~
| ► | History Forum Come and discuss about History, Civilizations, Historical Events and Figures |
| ► | History Web-Ring A community of sites, blogs and forums dedicated to History. Do not hesitate to submit your site. |
and are licensed under the GNU Free Documentation License.
Lexicon - Privacy Policy - Spiritus-Temporis.com ©2005.