Grandfather -

Ok, so I modified some of the data file, as well as the suggestions already posted. It is clear, now, after modifying the building names that the output is only containing unique records. The input is this:

VLAN Tag 1st Octet 2nd Octet 3rd Octet 4th Octet Mask + Mask Subnet Building Description 321 10 32 32 0 19 255.255.224.0 10.32.32.0 /19 + Building1 Data VLAN 322 10 32 0 24 255.255.255.0 10.32..0 /24 Bui +lding1 Data VLAN 323 10 32 128 0 19 255.255.224.0 10.32.128.0 /19 + Building1 Data VLAN 324 10 32 96 0 19 255.255.224.0 10.32.96.0 /19 + Building1 Data VLAN 325 10 32 160 0 19 255.255.224.0 10.32.160.0 /19 + Building1 Data VLAN 326 10 32 192 0 19 255.255.224.0 10.32.192.0 /19 + Building1 Data VLAN 327 10 32 64 0 19 255.255.224.0 10.32.64.0 /19 + Building1 Data VLAN 328 10 32 248 0 22 255.255.252.0 10.32.248.0 /22 + Building1 Data VLAN 329 10 32 0 24 255.255.255.0 10.32..0 /24 Bui +lding1 Data VLAN 330 10 32 224 0 24 255.255.255.0 10.32.224.0 /24 + Building1 Data VLAN 331 10 32 225 0 24 255.255.255.0 10.32.225.0 /24 + Building2 Data VLAN 332 10 32 228 0 24 255.255.255.0 10.32.228.0 /24 + Building2 Data VLAN 333 10 32 229 0 24 255.255.255.0 10.32.229.0 /24 + Building2 Data VLAN 334 10 32 232 0 24 255.255.255.0 10.32.232.0 /24 + Building2 Data VLAN 335 10 32 233 0 24 255.255.255.0 10.32.233.0 /24 + Building2 Data VLAN 336 10 32 236 0 24 255.255.255.0 10.32.236.0 /24 + Building2 Data VLAN 337 10 32 237 0 24 255.255.255.0 10.32.237.0 /24 + Building2 Data VLAN 338 10 32 240 0 24 255.255.255.0 10.32.240.0 /24 + Building2 Data VLAN 339 10 32 241 0 24 255.255.255.0 10.32.241.0 /24 + Building2 Data VLAN 340 10 32 244 0 24 255.255.255.0 10.32.244.0 /24 + Building2 Data VLAN 341 10 32 245 0 24 255.255.255.0 10.32.245.0 /24 + Building3 Data VLAN 342 10 32 0 24 255.255.255.0 10.32..0 /24 Bui +lding3 Data VLAN 343 10 32 0 24 255.255.255.0 10.32..0 /24 Bui +lding3 Data VLAN 344 10 32 0 24 255.255.255.0 10.32..0 /24 Bui +lding3 Data VLAN 345 10 32 0 24 255.255.255.0 10.32..0 /24 Bui +lding3 Data VLAN 346 10 32 0 24 255.255.255.0 10.32..0 /24 Bui +lding3 Data VLAN 347 10 32 0 24 255.255.255.0 10.32..0 /24 Bui +lding3 Data VLAN 348 10 32 0 24 255.255.255.0 10.32..0 /24 Bui +lding3 Data VLAN 349 10 32 0 24 255.255.255.0 10.32..0 /24 Bui +lding3 Data VLAN 350 10 32 2 0 23 255.255.254.0 10.32.2.0 /23 B +uilding3 Data VLAN 351 10 32 4 0 23 255.255.254.0 10.32.4.0 /23 B +uilding4 Data VLAN 352 10 32 6 0 23 255.255.254.0 10.32.6.0 /23 B +uilding4 Data VLAN 353 10 32 8 0 23 255.255.254.0 10.32.8.0 /23 B +uilding4 Data VLAN 354 10 32 10 0 23 255.255.254.0 10.32.10.0 /23 + Building4 Data VLAN 355 10 32 12 0 23 255.255.254.0 10.32.12.0 /23 + Building4 Data VLAN 356 10 32 14 0 23 255.255.254.0 10.32.14.0 /23 + Building4 Data VLAN 365 10 33 32 0 24 255.255.255.0 10.33.32.0 /24 + Building4 Data VLAN 606 10 0 249 0 29 255.255.255.248 10.0.249.0 /29 + Building4 Data VLAN

The output is:

Building name Building VLAN number VLAN Tag VLAN 1st Octet 1st Octet VLAN 2nd Octet 2nd Octet VLAN 3rd Octet 3rd Octet VLAN 4th Octet 4th Octet VLAN Subnet Slash Mask VLAN Subnet Dotted Mask VLAN Network Subnet VLAN Description Description Building name Building1 VLAN number 330 VLAN 1st Octet 10 VLAN 2nd Octet 32 VLAN 3rd Octet 224 VLAN 4th Octet 0 VLAN Subnet Slash 24 VLAN Subnet Dotted 255.255.255.0 VLAN Network 10.32.224.0 /24 VLAN Description Data VLAN Building name Building2 VLAN number 340 VLAN 1st Octet 10 VLAN 2nd Octet 32 VLAN 3rd Octet 244 VLAN 4th Octet 0 VLAN Subnet Slash 24 VLAN Subnet Dotted 255.255.255.0 VLAN Network 10.32.244.0 /24 VLAN Description Data VLAN Building name Building3 VLAN number 350 VLAN 1st Octet 10 VLAN 2nd Octet 32 VLAN 3rd Octet 2 VLAN 4th Octet 0 VLAN Subnet Slash 23 VLAN Subnet Dotted 255.255.254.0 VLAN Network 10.32.2.0 /23 VLAN Description Data VLAN Building name Building4 VLAN number 606 VLAN 1st Octet 10 VLAN 2nd Octet 0 VLAN 3rd Octet 249 VLAN 4th Octet 0 VLAN Subnet Slash 29 VLAN Subnet Dotted 255.255.255.248 VLAN Network 10.0.249.0 /29 VLAN Description Data VLAN

In reply to Re^2: Printing of Array Hash is Missing Elements by spickles
in thread Printing of Array Hash is Missing Elements by spickles

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.