in reply to Creating on-the-fly hashes?

I agree with Tilly, that you should be assigning to a hash, rather than using symbolic references.

That said, the reason your code doesn't work is twofold. First, in "\$$stuff{$1} = $2", $stuff{$1} is interpolated as a value from %stuff, whereas you're trying to use $stuff as a symbolic reference. Second, the values of $1 and $2 are interpolated and then evalled, when the values may not be valid Perl code. (If $2 holds the string '+++++', for example, your eval won't compile.)

On the one hand, a correct line would be: eval "\$$stuff\{\$1} = \$2"; On the other hand, the eval is unnecessary: ${$stuff}{$1} = $2; On the gripping hand, the symbolic ref is also unnecessary, as previously stated: $values{$stuff}{$1} = $2; I hope that's helpful!