User Profile

Collapse

Profile Sidebar

Collapse
pranksk
pranksk
Last Activity: Feb 9 '09, 02:07 PM
Joined: Jan 30 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • pranksk
    replied to Compare two complex Hash
    in Perl
    Here's my hash again:

    Code:
    $VAR1 = {
              'files' => {
                         'requirement_set' => {
                                              'exclude_arch' => [
                                                                'ARCH_C',
                                                                'ARCH_A',
                                                                'ARCH_E'
    ...
    See more | Go to post

    Leave a comment:


  • pranksk
    replied to Compare two complex Hash
    in Perl
    how do I use code tags so my posts display in a good format?
    See more | Go to post

    Leave a comment:


  • pranksk
    replied to Compare two complex Hash
    in Perl
    Here's what I've been trying, but i don't think it's working:

    Code:
    sub _compare_hashes :PRIVATE {
        
        my ($data1, $data2) = @_;
        my $found = 0;
        my @missing;
        
        foreach my $parent_node1 (keys %data1) {
            my @childNodes1 = $parent_node1->childNodes();
            foreach $parent_node2 (keys %data2) {
                my @childNodes2 = $parent_node2->childNodes();
    ...
    See more | Go to post
    Last edited by numberwhun; Jan 30 '09, 08:42 PM. Reason: Please use code tags!

    Leave a comment:


  • pranksk
    replied to Compare two complex Hash
    in Perl
    Here is my hash.

    Code:
    $VAR1 = {
              'files' => {
                         'requirement_set' => {
                                              'exclude_arch' => [
                                                                'ARCH_C',
                                                                'ARCH_A',
                                                                'ARCH_E'
    ...
    See more | Go to post

    Leave a comment:


  • pranksk
    replied to Compare two complex Hash
    in Perl
    Howevrr, that link points to a thread that explains how to merge the two hashes.

    I just want to compare the 2 hashes (compare all keys and values of all parent and child nodes) and print out the differences in keys, values, etc
    See more | Go to post

    Leave a comment:


  • pranksk
    replied to Compare two complex Hash
    in Perl
    Hi,

    Were you able to figure out how to compare these two hashes?
    I am trying to do the same and not sure how. I'm new to Perl as well.

    Any help will be much appreciated.

    Thanks!
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...