in reply to Python dict to perl hash

Several clever solutions to the specific problem of rot13, but useless in terms of the more general problem of converting a Python dict to a Perl hash! I've heard of an XY problem; are these XY solutions? ;)

Dum Spiro Spero

Replies are listed 'Best First'.
Re^2: Python dict to perl hash
by BrowserUk (Patriarch) on Mar 30, 2015 at 15:32 UTC
    are these XY solutions? ;)

    Kind depends upon the reason for having to do a conversion in the first place doesn't it?

    Unless there is a generic need to convert python dicts to Perl hashes?


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
    In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
        But I copied that dict from somewhere and need to convert it to hash to work upon it.

        Hm. His use of "it" implies singular; but it could go either way I suppose.

        (I'm just having trouble thinking of a scenario where he'd regularly or repeatedly need to C&P a chunk of Python dict initialisation into a Perl string and the parse it to initialise a hash.)

        But then, there are better ways of doing it in Python also:


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
        In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked