We Recommend

Learning Perl Learning Perl
In this smooth, carefully paced course, a leading Perl trainer teaches you to program in the language that threatens to make C, sed, awk, and the Unix shell obsolete for many tasks. This book is the "official" guide for both formal (classroom) and informal learning. It is fully accessible to the novice programmer.


Posted By

noah on 07/03/07


Tagged

table object array print pattern dump iterator hash 2001 lookup


Versions (?)


dump the contents of a data structure


Published in: Perl 


hashes in Perl can be so elegant

  1. #dump a hash
  2. while (my ($key, $value) = each %target_list)
  3. {
  4. print "$key=>$value \n";
  5. }
  6.  
  7. #dump an array
  8. for (@list){print "$_\n";}

Report this snippet 

You need to login to post a comment.