On Tue, Sep 30, 2003 at 11:07:24PM +0300, Gaal Yahas wrote:
> I like hash slices:
> 
>     ($one, $two, $three) = @hash{ qw/aaa bbb ccc/ };
> 
> Sadly, this doesn't work as an lvalue:
> 
>     @hash{ qw/aaa bbb ccc/ } = ($one, $two, $three);        # WRONG

It doesn't?

$ perl -wle '$one=1; $two=2; $three=3; @h{qw(a b c)} = ($one,$two,$three);  print %h'
c3a1b2

Reply via email to