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

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

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

5条回答
  •  清酒与你
    2021-02-05 04:27

    I use Data::Dump, it's output is a bit cleaner than Data::Dumper's (no $VAR1), it provides quick shortcuts and it also tries to DTRT, i.e. it will print to STDERR when called in void context and return the dump string when not.

提交回复
热议问题