greetings all monks,
The Dilemna -> I need to create then compare two arrays extracting from them values from both sides when the partial entry from the first array is equated in the second
In Depth -> I have a file full of device names all containing unique entries in the style of loc-city-devicetype. I also have a second file that contains all the city names (can you see where I am going with this)
I want to take the -city- part of the device name and compare it to the list of cities, then find a match and print the full device name and then the city name right after it.
example: dev-wic1-7700-g2-v1008 is a device in Wickliffe KY. the dev-wic1... is in the first file (along with about 3000 others) all one entry per line. The second file contains City and State names (also one entry perline)
I want to equate wic1 to Wickliffe and then print out something like
- Wickliffe dev-wic1-7700-g2-v1008 and do so for every device in the first file.
Thanks for any enlightened insight you can give me
-blackhawk down
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.