Re: Assigning anonymous hash to a list

2013-07-31 Thread Abigail
On Tue, Jul 30, 2013 at 11:36:12PM -0300, Hernan Lopes wrote: sorry i meant 1 thing on the left and one thing on the right. Both are lists and should be the same size. Since when? Both: my ($a, $b) = (1); and my ($a, $b) = (1, 2, 3); are fine. On 7/30/13, Hernan Lopes

Re: Assigning anonymous hash to a list

2013-07-31 Thread LeoNerd
On Tue, 30 Jul 2013 20:23:40 +0100 Hakim Cassimally hakim.cassima...@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

Re: Assigning anonymous hash to a list

2013-07-31 Thread Hernan Lopes
it should be the same size to do what he wants... otherwise it wont work. On 7/31/13, Abigail abig...@abigail.be wrote: On Tue, Jul 30, 2013 at 11:36:12PM -0300, Hernan Lopes wrote: sorry i meant 1 thing on the left and one thing on the right. Both are lists and should be the same size.

Re: Assigning anonymous hash to a list

2013-07-31 Thread Peter Corlett
On Wed, Jul 31, 2013 at 01:04:11PM -0300, Hernan Lopes top-posted: it should be the same size to do what he wants... otherwise it wont work. Why should? Perl doesn't require the LHS of an array assignment have the same number of elements as the RHS, and there are a number of use cases where you

Re: Assigning anonymous hash to a list

2013-07-31 Thread Paul Makepeace
On Wed, Jul 31, 2013 at 10:37 AM, Peter Corlett ab...@cabal.org.uk wrote: On Wed, Jul 31, 2013 at 01:04:11PM -0300, Hernan Lopes top-posted: it should be the same size to do what he wants... otherwise it wont work. Why should? Perl doesn't require the LHS of an array assignment have the

Re: Assigning anonymous hash to a list

2013-07-31 Thread Hernan Lopes
if you dont understood what i meant, i am not going to explain. On 7/31/13, Peter Corlett ab...@cabal.org.uk wrote: On Wed, Jul 31, 2013 at 01:04:11PM -0300, Hernan Lopes top-posted: it should be the same size to do what he wants... otherwise it wont work. Why should? Perl doesn't require