I will vote for JSON (or Data::Serializer , as mentioned in another answer, combined with JSON ).
The JSON module is fast enough and efficient (if you install JSON :: XS from cpan, it will compile a version of C for you, and use JSON will automatically use this).
It works great with Perl data structures, is standardized, and Javascript syntax is so similar to Perl syntax. There are options that you can set using the JSON module to improve readability (linebreaks, etc.).
I also used Storable . I donโt like it - the interface is strange, and the conclusion is meaningless, and this is a proprietary format. Data::Dumper is fast and readable, but in fact it should be one-way ( eval ing a bit hacky), and again, this is just Perl. I also rode myself. In the end, I came to the conclusion that JSON is the best, fast, flexible and reliable.
source share