[tpm] Lightning Talk lineup

Richard Dice rdice at pobox.com
Fri Oct 3 10:36:32 PDT 2008


> my @symbols = map { +{ 'key' => $_ } } @things;
>

I would have guessed that, in this situation...

my @symbols = map { { key => $_ } } @things;

... would work too.  I.e. the Perl compiler would be able to recognize the
key => $value construct within { ... } and figured out that this was meant
to be a hashref.

Just to fuX0r with your minds, I'm like the following would work too...

my @symbols = map { \(my %hash = ( key => $_ )) } @things;

... but proving (or disproving) this is left as an exercise to the reader.
:-)

Cheers,
 - Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20081003/0f41ee5b/attachment.html>


More information about the toronto-pm mailing list