Assigning anonymous hash to a list

Paul LeoNerd Evans leonerd at leonerd.org.uk
Wed Jul 31 12:28:07 BST 2013


On Tue, 30 Jul 2013 20:23:40 +0100
Hakim Cassimally <hakim.cassimally at gmail.com> wrote:

> As it happens, Perl *can* do destructuring bind.  You want parentheses
> around the list though:

Incidentally, that's not a destructuring bind, it's just a
list-assignment. A full destructuring bind is recursive; it would allow
things like

  my [ $a, $b, { foo => $c, bar => $d } ] =
     [ "some", "values", { bar => "here", foo => "are" } ];

-- 
Paul "LeoNerd" Evans

leonerd at leonerd.org.uk
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: not available
Url : http://london.pm.org/pipermail/london.pm/attachments/20130731/27d00663/signature.pgp


More information about the london.pm mailing list