Posted By

noah on 07/03/07


Tagged

table object array print pattern dump iterator hash 2001 lookup


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

icecreamboyy


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  

Comments

RSS Icon Subscribe to comments
Posted By: alperyilmaz on May 23, 2009

Data::Dumper module can be used for dumping contents of pretty complexes hashes/arrays.

You need to login to post a comment.