As dave_the_m mentions, you seem to be a bit confused with your sigils. You know, those funny little characters that go in front of variables in Perl. Your use is consistent with the designs for Perl6, but back here in Perl5 land (i.e. now, not in the future) we still have to use $ when we're accessing a single value and @ when we're accessing a list of values. In both your examples of hash access -- %hash(@array) and %hash{/^foo/} -- you picked the wrong one. Those should be @hash{@array} and $hash{/^foo/}. In the first you have another syntax error, too: those parentheses should be curly brackets. Perhaps it's time to refresh yourself on Perl's syntax. You might find perlcheat to be a handy chart.
HTH
In reply to Re: Assigning regex from arrays to hash keys
by revdiablo
in thread Assigning regex from arrays to hash keys
by wilbur
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |