in reply to Assigning regex from arrays to hash keys
my %hash; tie %hash, 'Tie::RegexHash'; @hash{@array} = ();
Note that the my declaration can't be included with the hash access, the hash needs to be tied first, and it's @hash{..} not %hash{...} for slicing.
|
|---|