A
AC
Why does this fail with a syntax error
my @items = qw(a b c d e);
my @hash{@items} = 0..$#items;
but this does not?
my @items = qw(a b c d e);
@hash{@items} = 0..$#items;
I really want to use fewer lines in my code and I'd hate to use one line to
declare the hash and one line to initialize it.
Many Thanks,
Allan
my @items = qw(a b c d e);
my @hash{@items} = 0..$#items;
but this does not?
my @items = qw(a b c d e);
@hash{@items} = 0..$#items;
I really want to use fewer lines in my code and I'd hate to use one line to
declare the hash and one line to initialize it.
Many Thanks,
Allan