What is Perl's equivalent to PHP's print_r()?

后端 未结 5 1166
我在风中等你
我在风中等你 2021-02-05 03:59

I find print_r in PHP extremely useful, but wonder if there is anything remotely equivalent in Perl?

5条回答
  •  梦毁少年i
    2021-02-05 04:39

    An alternative to Data::Dumper that does not produce valid Perl code but instead a more skimmable format (same as the x command of the Perl debugger) is Dumpvalue. It also consumes a lot less memory.

    As well, there is Data::Dump::Streamer, which is more accurate in various edge and corner cases than Data::Dumper is.

提交回复
热议问题