pretty-print array


/ Published in: Perl
Save to your folder(s)



Copy this code and paste it in your HTML
  1. sub pretty_print_array {
  2. my ( $title, @array) = @_;
  3. my $numb = $#array +1;
  4.  
  5. print "Array : $title ($numb entries)\n";
  6. for $line (@array)
  7. {
  8. print "\t'$line'\n";
  9. }
  10. print "=========================\n\n";
  11. }
  12.  

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.