in reply to Outputting JSON with function () {...} values

And even if it were valid JSON, it couldn't work (at least not without a transpiler or something that does not currently exist). It assumes something along these lines is possible to write, and for it to be meaningful if you could—

print to_json({ a => sub(){\1} });

Update, removed extra brace.

Replies are listed 'Best First'.
Re^2: Outputting JSON with function () {...} values
by LanX (Saint) on Oct 22, 2018 at 17:11 UTC
    IMHO it's theoretically possible to convert core JS (i.e. neither DOM nor BOM) to Perl.

    But I have problems to see for what purpose.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice