Wiki in Four Lines of Perl is Short, Cryptic

| Comments

I think we can all admit to taking a shot or two at Perl Guys from time to time: I like to do it with a thick east-European accent. “Vat? You need billing system? I write in Perl. Ten lines.”

Well who’s laughing now? Here’s Sig Wik, a wiki in four lines of Perl. Four!

#!/usr/bin/perl
use CGI':all';path_info=~/\w+/;$_=`grep -l $& *`.h1($&).escapeHTML$t=param(t)
||`dd<$&`;open F,">$&";print F$t;s/htt\S+|([A-Z]\w+){2,}/a{href,$&},$&/eg;
print header,pre"$_<form>",submit,textarea t,$t,9,70

This all comes courtesy of the Shortest Wiki Contest. Good food for thought in the whole brevity vs. clarity thing.

blog comments powered by Disqus

About this Entry

This page contains a single entry by Aaron Oliver published on June 4, 2009 1:22 PM.

Stop Showing Me that Damn Triangle was the previous entry in this blog.

Wow. IMVU Runs 1 Million Automated Tests a Day is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Categories

Creative Commons License
This blog is licensed under a Creative Commons License.