Perl equiv to PHP print_r

A

Aidan

Hi Perl Peoples,

I'm quit new to perl, but have a pretty good knowledge of PHP. I'm playing
around with a few packages, and I'm having a bit of trouble figuring out how
to deal with hashes. In PHP, if I wanted to view the contents of $hash, all
I needed to do would be dump it out by using:

<? print_r($hash); ?>

And I would get a nice heirachial display of the data contained within
$hash. Is there an equivalent function in Perl? I'm sure there is, but
after much googling, I still can't find what it is... can anyone here tell
me what it is?

TIA

Aidan
 
S

SMO

Aidan said:
Hi Perl Peoples,

I'm quit new to perl, but have a pretty good knowledge of PHP. I'm playing
around with a few packages, and I'm having a bit of trouble figuring out how
to deal with hashes. In PHP, if I wanted to view the contents of $hash, all
I needed to do would be dump it out by using:

<? print_r($hash); ?>

And I would get a nice heirachial display of the data contained within
$hash. Is there an equivalent function in Perl? I'm sure there is, but
after much googling, I still can't find what it is... can anyone here tell
me what it is?

TIA

Aidan

Have a look at Data::Dumper

MS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top