Here is a small program to illustrate building a table, (using Text::Table).

#!/usr/bin/perl use strict; use warnings; use Text::Table; my $data = [ { 'model' => 'Cisco 7911', 'name' => 'SEP00229004C80A', 'product' => 'Cisco 7911' }, { 'model' => 'Cisco 7911', 'name' => 'SEP00229004C851', 'product' => 'Cisco 7911' }, { 'model' => 'Cisco 7911', 'name' => 'SEP00229004CC92', 'product' => 'Cisco 7911' }, ]; my @headers = qw/ Model Name Product /; my $tb = Text::Table->new( map {title => $_}, @headers ); for my $href (@$data) { $tb->load( [ @$href{ map lc, @headers } ] ); } print $tb;

***prints

Model Name Product Cisco 7911 SEP00229004C80A Cisco 7911 Cisco 7911 SEP00229004C851 Cisco 7911 Cisco 7911 SEP00229004CC92 Cisco 7911

Chris


In reply to Re: Help with Dumping data. Manipulate hashes output. by Cristoforo
in thread Help with Dumping data. Manipulate hashes output. by oldwarrior32

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.