I need to be able to print this data structure and cant get it to print correctly. Thanks in advance!!! from dumper:
$VAR1 = { '/cacxxx/pxxx/datxxx/' => { 'free' => '27.6', 'sz' => '200', 'mxs' => { '200' => 'GB' }, 'dfree' => '168', 'avail' => '55' }, '/cachxxx/usr/xxx/xxx/' => { ...

while (<$fh>) { next if /^spawn/i .. /^right/i; if ( /(Cxxx Database Free Space)/ ) { $Ggroup = $1; } next if /Database\s+|Max Size|Size|Available|%Free|Disk Free|facxx +xx|$uxdate.*/i; next if $. == 35 or $. == 36; next if /cacheaudit/i .. eof; $db = +(split)[0]; $mxsz = +(split)[1]; $mxsz1 = substr($mxsz, 0, -2); $mxunit = substr($mxsz, -2, 2); $sz = +(split)[2]; $sz1 = substr($sz, 0, -2); $szunit = substr($sz, -2, 2); $avail = +(split)[3]; $avail1 = substr($avail, 0, -2); $avunit = substr($avail, -2, 2); $free = +(split)[4]; $dfree = +(split)[5]; $dfree1 = substr($dfree, 0, -2); $dfunit = substr($dfree, -2, 2); $cacheDBs{$db} = { 'mxs' => {$mxsz1, $mxunit}, 'sz' => $sz1, 'avail' => $avail1, 'free' => $free, 'dfree' => $dfree1, }; for my $key (keys %cacheDBs) { print "\n/opt/freeware/bin/gmetric -n $db -T $db -g $Ggroup -t dou +ble -u MaxSize -v $cacheDBs{$db}->{mxs} -d 45)\n"; } __out__ /opt/freeware/bin/gmetric -n /cacxxx/pixxx/daxxx/ -T /cacxxx/pitxx/dax +xx/ -g Caxxx Database Free Space -t double -u MaxSize -v HASH(0x2015d +98c) -d 45)
needs to be:
/opt/freeware/bin/gmetric -n /cacxxx/pitxxx/daxxx/ -T /cacxxx/pitxxx/d +axxx/ -g Caxxx Database Free Space -t double -u MaxSize GB -v 250 -d +45)

sample data set is:
Caxxx Database Free Space Jul 09 2013 8:44 AM Database Max Size Size Available %Free + Disk Free /cacxxx/crxxx/dxxx/ 240GB 240GB 53GB 21.88 1 +33GB /cacxxx/cxxx/daxxx/ 280GB 280GB 58GB 20.79 1 +33GB

In reply to print a hash ref by teamassociated

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.