Perl Christmas Quiz
James Laver
james.laver at gmail.com
Tue Dec 16 19:08:18 GMT 2008
On Tue, Dec 16, 2008 at 2:54 PM, Paul Makepeace <paulm at paulm.com> wrote:
>
> This concatenates the repeated elements into e.g. a single string. Try
> adding some extra fields in your test data and you'll end up with
> something like,
>
> ['q', 'pp', 'n']
>
> rather than
>
> ['q', 'p', 'p', 'n']
>
> Slightly oddly, IMO, python doesn't have a 'flatten' function.
>
> P
>
With all of these code-based things going on, I'm inclined to suggest
a more disturbing challenge - overcomplicating "hello world"
Here's my pitiful first attempt:
sub make_hello_sayer { sub { printf "hello %s\n", shift; } }
my $sayer = make_hello_sayer();
$sayer->('world');
I'm looking forward to the first entry that combines regexen with some
sort of tie.
Let the games begin.
--James
More information about the london.pm
mailing list