I decided to change my code around a bit, so now I am not seeing a value in my HoH when I print normally, but when I print using Data Dumper I see it??? The item I am NOT seeing is the number 3 under __OUT__. Help! thnkU!
__DUMPER OUT__ $VAR1 = { DATE: 01/20/2012 TIME: 21:12:38 ' => { ALERT LEVEL: 6 = Boot possible, pending failure - action required SOURCE: 4 = power ', SOURCE DETAIL: 4 = high voltage DC power SOURCE ID: FF PROBLEM DETAIL: 7 = illegal power supply type ', '19' => ' Days Bet +ween Today and last Alert' }, DATE: 02/05/2012 TIME: 07:50:19 ' => { SOURCE DETAIL: 0 = unknown, no source stated SOURCE ID: FF PROBLEM DETAIL: 0 = no problem detail ', '3' => ' Days Betw +een Today and last Alert', ALERT LEVEL: 2 = Non-Urgent operator attention required SOURCE: 0 = unknown, no source stated ' } }; __OUT__ # perl HPMP_mark3_parselogs.plx DATE: 01/20/2012 TIME: 21:12:38 ==> ALERT LEVEL: 6 = Boot possible, pending failure - action required SOURCE: 4 = power SOURCE DETAIL: 4 = high voltage DC power SOURCE ID: FF PROBLEM DETAIL: 7 = illegal power supply type 19 Days Between Today and last Alert DATE: 02/05/2012 TIME: 07:50:19 ==> SOURCE DETAIL: 0 = unknown, no source stated SOURCE ID: FF PROBLEM DETAIL: 0 = no problem detail ALERT LEVEL: 2 = Non-Urgent operator attention required SOURCE: 0 = unknown, no source stated __ACTUAL_CODE__ use strict; use warnings; use FileHandle; use MIME::Lite; use Date::Calc "Delta_Days", "Today"; my $RLOG = new FileHandle "+< $Rawlog" or warn "Open failed: $!"; my (@ary, $recordcount, $alert4orMoreCount, @attnlight, $dateofalert, @dateofalert, $arranged, $days_between, @days_between, $attnlightcount, @dates, $alert3orLessCount, %GSPmsgHash, $date, $alertLv, $src, $srcD, $pr +obD ); my ( $year,$month,$day ) = Today(); while (<$RLOG>) { if (/(Log Entry\s\#.*)/) { ++$recordcount; my $log = $1 .+ "$RTF{ln2}"; my $sys = <$RLOG>; $date = <$RLOG>; $alertLv = <$RLOG>; <$RLOG>; $src = <$RLOG>; $srcD = <$RLOG>; $probD = <$RLOG>; <$RLOG>; my $callerA = <$RLOG>; my $callerAS = <$RLOG>; my $rptEnt = <$RLOG>; <$RLOG>; my $hex1 = <$RLOG>; my $hex2 = <$RLOG> .+ "$RTF{ln}=========================== +==============="; push @ary, ($log,$sys,$date,$alertLv,$src,$srcD, $probD,$callerA,$callerAS,$rptEnt,$hex1,$hex2 ); if (/(LEDs:\s+RUN.*)/) { my $attnlight = <$RLOG>; push @attnlight, (split(" ", $attnlight, 0))[1]; } $dateofalert = ((split (" ", $date, 0))[1]); $dateofalert =~ y /\///d; $arranged = substr( $dateofalert, -4, 4 ) . substr( $dateof +alert, 0, 4); my $yyyy = substr( $arranged, 0, 4); my $mm = substr( $arranged, -4, 2); my $dd = substr( $arranged, -2); $days_between = Delta_Days($yyyy, $mm, $dd, $year, $month, $da +y); $GSPmsgHash{$date} = { $alertLv, $src, $srcD, $probD, $days_between, ' Days Between Today and last Alert', } } } $RLOG->close; while ( my ($k, $v) = each(%GSPmsgHash) ) { print "\n$k ==>\n",%{$v},"\n"; }

In reply to Re^4: NOT seeing data in HoH by dbs
in thread add data to HoA by dbs

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.