Yes of course.

Few lines from <INPUT>

143599203|No|NACK|ENA||Major|20180129054027||ARM|NSA|PRM|0|DCN|Insuffi +cient SNMP security settings|HN408-CP-1E-I|3176 && ne|||||||No|| 143599356|No|NACK|ENA|ip|Major|20180129054037||CLR|NSA|PRM|0|DCN|CLEAR +ED: Network element does not respond to SNMP requests|HN4000e|3176 && + ne|||||||No|| 143599357|No|NACK|ENA|ip|Major|20180129054039||CLR|NSA|PRM|0|DCN|CLEAR +ED: Insufficient SNMP security settings|HN4000e|3176 && ne|||||||No|| 143599999|No|NACK|ENA|ip|Major|20180129054529||ARM|NSA|PRM|0|DCN|Netwo +rk element does not respond to SNMP requests|HN4000e|3176 && ne|||||| +|No||

I've redacted the IP address and replaced with ip and also entered ne in place of a 6-9 digit number as it's sensitive, but hopefully this gives an idea of the format. Here's a sample of the output the script currently produces. 1st and 2nd column are $node_ip and $ne (both redacted) and third column is then $total{$ne}++ that seems to increment just fine and the final column is what I'm trying to call as the max but it increments regardless of what $ne is.

ip1 5 | Network element does not respond to SNMP requests | + 212 | ip2 213 | Network element does not respond to SNMP requests | + 213 | ip2 214 | Network element does not respond to SNMP requests | + 214 | ip3 4 | Network element does not respond to SNMP requests | + 214 | ip2 215 | Network element does not respond to SNMP requests | + 215 | ip2 216 | Network element does not respond to SNMP requests | + 216 | ip4 1 | Network element does not respond to SNMP requests | + 216 | ip2 | 217 | Network element does not respond to SNMP requests +| 217 | ip2 218 | Network element does not respond to SNMP requests | + 218 | ip2 219 | Network element does not respond to SNMP requests | + 219 |

In reply to Re^2: Print Max Hash by bartrad
in thread Print Max Hash by bartrad

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.