Welcome to the Monastery | |
PerlMonks |
Re: printing refence of hash inside a hashby liverpole (Monsignor) |
on May 12, 2007 at 14:13 UTC ( [id://615076]=note: print w/replies, xml ) | Need Help?? |
Hi opensourcer,
What shmem points out is that you're apparently trying to use $_ to refer to 2 separate (distinct) variables, which you can't do. Samy_rio demonstrated one solution, which is to name the loop variable in each of the loops, so that there isn't a naming conflict. I wanted to mention an alternative way of viewing the contents of a (possibly complicated) data structure, which is quite commonly used -- Data::Dumper. For example:
which prints:
s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
In Section
Seekers of Perl Wisdom
|
|