Thanks. I am able to understand your code the best, yet hashes are still confusing to me. With this said, I have a couple of questions:

1) If you are returning "%data" (A hash), how is this being stored in "@records" (an array?)

2) The "print @$_ for @records" prints everything fine, but how would I only print one of the three?

Here is the real data I using.
OSPF AS SCOPE link state database Type ID Adv Rtr Seq Age Opt Cksu +m Len Router 1.1.252.17 1.1.252.17 0x80002db7 2418 0x22 0xffa2 84 bits 0x0, link count 5 id 172.16.22.0, data 255.255.255.0, Type Stub (3) TOS count 0, TOS 0 metric 1 id 1.1.254.4, data 255.255.255.255, Type Stub (3) TOS count 0, TOS 0 metric 0 id 1.1.254.1, data 1.1.254.42, Type PointToPoint (1) TOS count 0, TOS 0 metric 65 id 1.1.254.41, data 255.255.255.255, Type Stub (3) TOS count 0, TOS 0 metric 65 id 1.1.254.42, data 255.255.255.255, Type Stub (3) TOS count 0, TOS 0 metric 0 Aging timer 00:19:42 Installed 00:40:15 ago, expires in 00:19:42, sent 00:40:13 ago Last changed 1d 00:00:21 ago, Change count: 420 Router *1.1.254.1 1.1.254.1 0x80000723 2421 0x22 0x7d4 108 bits 0x0, link count 7 id 1.1.254.59, data 1.1.254.59, Type Transit (2) TOS count 0, TOS 0 metric 1 id 1.1.254.44, data 255.255.255.252, Type Stub (3) TOS count 0, TOS 0 metric 1 id 1.1.254.1, data 255.255.255.255, Type Stub (3) TOS count 0, TOS 0 metric 0 id 1.1.254.3, data 1.1.254.33, Type PointToPoint (1) TOS count 0, TOS 0 metric 32 id 1.1.254.32, data 255.255.255.252, Type Stub (3) TOS count 0, TOS 0 metric 32 id 1.1.252.17, data 1.1.254.41, Type PointToPoint (1) TOS count 0, TOS 0 metric 65 id 1.1.254.40, data 255.255.255.252, Type Stub (3) TOS count 0, TOS 0 metric 65 Gen timer 00:09:38 Aging timer 00:19:38 Installed 00:40:21 ago, expires in 00:19:39, sent 00:40:19 ago Last changed 1d 00:00:21 ago, Change count: 609, Ours Router 1.1.254.3 1.1.254.3 0x80002dea 692 0x22 0xe24d 72 bits 0x0, link count 4 id 172.16.16.0, data 255.255.255.0, Type Stub (3) TOS count 0, TOS 0 metric 1 id 1.1.254.3, data 255.255.255.255, Type Stub (3) TOS count 0, TOS 0 metric 0 id 1.1.254.1, data 1.1.254.34, Type PointToPoint (1) TOS count 0, TOS 0 metric 32 id 1.1.254.32, data 255.255.255.252, Type Stub (3) TOS count 0, TOS 0 metric 32 Aging timer 00:48:28 Installed 00:11:29 ago, expires in 00:48:28, sent 00:11:27 ago Last changed 22:41:31 ago, Change count: 28 Router 1.1.254.57 1.1.254.57 0x80001040 23 0x22 0xe8a7 72 bits 0x2, link count 4 id 1.1.254.59, data 1.1.254.57, Type Transit (2) TOS count 0, TOS 0 metric 10 id 1.1.252.192, data 255.255.255.192, Type Stub (3) TOS count 0, TOS 0 metric 10 id 10.2.20.0, data 255.255.255.0, Type Stub (3) TOS count 0, TOS 0 metric 10 id 10.2.18.0, data 255.255.255.0, Type Stub (3) TOS count 0, TOS 0 metric 10 Aging timer 00:59:36 Installed 00:00:22 ago, expires in 00:59:37, sent 00:00:20 ago Last changed 6w3d 08:01:42 ago, Change count: 3 Extern 0.0.0.0 1.1.254.57 0x8000101d 23 0x20 0xc0b2 + 36 mask 0.0.0.0 Type 2, TOS 0x0, metric 1, fwd addr 0.0.0.0, tag 0.0.126.75 Aging timer 00:59:36 Installed 00:00:22 ago, expires in 00:59:37, sent 00:00:20 ago Last changed 6w3d 08:02:28 ago, Change count: 1

In reply to Re^2: Is there a better way to approach this? by ewhitt
in thread Is there a better way to approach this? by ewhitt

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.