in reply to Python dict to perl hash

If you need a generic solution call a Python script with exec, which is reading a dict from STDIN and writing JSON to STDOUT.

See Re^3: How to "source" a shell file in Perl? (Trojan Dump) for another but similar approach for bash with inlined code.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)

PS: Je suis Charlie!