in reply to Data::Dumper is not quite what I want.

You can simply turn on the Deparse option of Data::Dumper:
use Data::Dumper; sub a { print "abc"; } sub b { print "123" } $hash = {"a",\&a, "b", \&b}; $Data::Dumper::Deparse = 1; print Dumper($hash);
It also works with anonymous:
use Data::Dumper; sub b { print "123" } $hash = {"a",sub {print "abc"}, "b", \&b}; $Data::Dumper::Deparse = 1; print Dumper($hash);
But there is caution stated in the doc, check it.

Replies are listed 'Best First'.
Re: Re: Data::Dumper is not quite what I want.
by John M. Dlugosz (Monsignor) on Dec 27, 2002 at 15:44 UTC
    That's not mentioned in my copy (came with ActiveState 5.6.1). I guess it was added in a newer version, and AS doesn't track the latest versions of modules with their updates.

    —John