in reply to Syntax allowed in interpolated hash/array indexes

The reason your second qq is a syntax error is because you are using your end delimiter in your string.

Try: qq[ $h->{  fn("{") =~ /c/ } ]

The syntax allowed there is an expression, any expression will do. You are still somewhat limited, even in the expression, by the delimiters you use for the qq, however.

There's even a module (Interpolation) that takes advantage of this by tying a hash that would simply return the result of the expression.