On May 5, 2005, at 23:07, Ing. Branislav Gerzo wrote:
tried something like this, but it doesnt work: my $hash{qw/one two three four/} = (1..4);
You were quite close:
my %hash; @hash{qw/one two three four/} = 1..4;
The problem was that "my" accepts variables (modulus details), not expressions like $array[2] or hash slices like that one.
-- fxn
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>