in reply to print_r or var_dump?

I would look at Data::Dumper. It is in the standard distribution, and does a good job of it.
"They shall not overcome. Whoever told them that the truth shall set them free was obviously and grossly unfamiliar with federal law."
    -- John Ashcroft