perl_5eeker has asked for the wisdom of the Perl Monks concerning the following question:
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
The output I get from the above is like this:foreach my $elem (@vgmap) { printf "$elem->{node}:$elem->{vg}:$elem->{maj_num}\n"; }
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!!node1:vg1:36 node2:vg1:36 node1:vg2:37 node2:vg2:37 node1:vg3:38 node2:vg3:40
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Compare the values in the hash
by haukex (Archbishop) on Apr 28, 2019 at 13:02 UTC | |
by perl_5eeker (Novice) on Apr 28, 2019 at 14:12 UTC | |
|
Re: Compare the values in the hash
by Marshall (Canon) on Apr 28, 2019 at 20:31 UTC |