>>>>> "GY" == Gaal Yahas <[EMAIL PROTECTED]> writes:
GY> I like hash slices:
GY> ($one, $two, $three) = @hash{ qw/aaa bbb ccc/ };
GY> Sadly, this doesn't work as an lvalue:
GY> @hash{ qw/aaa bbb ccc/ } = ($one, $two, $three); # WRONG
works fine for me.
perl -le '@h{ qw/aaa bbb/ }= (3, 5);print join ",", values %h'
5,3
where did you get the notion that hash slices won't work as an lvalue?
any list (of lvalues) can be an lvalue and a slice is just syntactic
sugar for the same list expanded out.
uri
--
Uri Guttman ------ [EMAIL PROTECTED] -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
Damian Conway Class in Boston - Sept 2003 -- http://www.stemsystems.com/class