Thanks Fastolfe, for an informative reply, also to japhy, geektron, and I think tilly in the Chattbox.

Actually, I'm looking for unique strings that happen to be hostnames.   The list is built using a variation of (code)) Cisco Pass Mass - IOS (deprecated by node 123464) to query a core switch for CDP neighbors (wiring closet "top o' stack" switches).   Next I feed the output back into the same script to find remaining switches in each wiring closet stack.   Then, I'll feed the complete list of core+closet switches back into the original (code)) Cisco Pass Mass - IOS (deprecated by node 123464) script to implement my config updates.

I've now got my hands on the Perl Cookbook, pouring over example 4.6.   Looks like I'm getting closer to a solution.   Keys of Hash, eh?
    cheers,
    ybiC


In reply to RE: (2) extract uniques and sort (thanks, getting closer)) by ybiC
in thread extract uniques and sort by ybiC

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.