[caracas-pm] Fwd: New Quiz: "What does this code do?" (1-December-2006)

Alexis Arnal aarnal at gmail.com
Fri Dec 15 14:52:05 PST 2006


---------- Forwarded message ----------
From: Shlomi Fish <shlomif at iglu.org.il>
Date: 01-dic-2006 10:35
Subject: New Quiz: "What does this code do?" (1-December-2006)
To: Perl Quiz of the Week <perl-qotw-discuss at plover.com>


Hi all!

Well, it's been a while since we had a quiz so here's another what does this
code do quiz:

{{{{{{
    my (@list) =
    (
        grep { $cgi->param("$prefix$_") }
        map { /^${prefix}(\d+)$/ ? ($1) : () }
        $cgi->param()
    );
}}}}}}

$cgi is a CGI.pm instance. (in case you couldn't guess.)

A friend of mine whose perl is quite rusty had problems understanding this
code.

What does this code do? And can you guess in what context it was used?

I'll reveal the solution after a 60 hours quota, and until then please send
them to me in private.

Regards,

        Shlomi Fish

---------------------------------------------------------------------
Shlomi Fish      shlomif at iglu.org.il
Homepage:        http://www.shlomifish.org/

Chuck Norris wrote a complete Perl 6 implementation in a day but then
destroyed all evidence with his bare hands, so no one will know his secrets.


-- 
#--------------------
#!/usr/bin/perl -w
# Ing. Alexis Arnal
# GNU/Linux user: 411537
# Debian - Kernel 2.6.7-1-386
# CNE. Caracas - Venezuela
#---------------------
use strict;
print "No basta con alcanzar la sabiduría, es necesario saber utilizarla\n";
print "Marco Tulio Cicerón. 106 AC-43 AC. Escritor, orador y político romano\n";
print "http://www.proverbia.net";
#---------------------


More information about the caracas-pm mailing list