Hello Experts,
I have started my perl journey 4 months ago, and I am enjoying and feeling good about it :) - I get a lot of help from PerlMonks!!
Just got into the hashes and need some help figuring out how I compare the values inside a hash
foreach my $elem (@vgmap) {
printf "$elem->{node}:$elem->{vg}:$elem->{maj_num}\n";
}
The output I get from the above is like this:
node1:vg1:36
node2:vg1:36
node1:vg2:37
node2:vg2:37
node1:vg3:38
node2:vg3:40
The third ":" delimited field is volume group major number, I'd like to compare that major number for each vg on the 2 nodes (node1 and node2) and make sure they match (for ex: vg1 has 36 on both nodes which is desirable but vg3 has a mismatch and I want to flag that).
Thanks in advance!!
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.