What I'm trying to do is pull records from a database that has information about how an access point should be configured. I wanted to read that data into an array of hashes so that I could then step through each of the elements and repeat the commands I would type at the command prompt to configure them and automate the process. The reason for the use of $new_name and $old_name is so that during the automation process I can keep track of which variable I am using. When the database info is imported, the ap name is the new one it needs to be changed to. I run a different sub to query the ap for its old name, which happens to be the default name it boots up with. Then, to change its name, I issue the command 'config ap name <new> <old>' So, as I said, I thought an array of hashes would be the ticket, and that I would then just step through the array and duplicate all of my cli commands.


In reply to Re^4: Hash throws out duplicate values by spickles
in thread Hash throws out duplicate values 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.