in reply to Re: unique data in dynamic hash
in thread unique data in dynamic hash

Hi thor,
right. testcase will be unique. but the array of hashes gets appended again and again.
how to maintain uniqueness with the data in the array elements.

also one more question here, how to push hashes to each testcase.

Replies are listed 'Best First'.
Re^3: unique data in dynamic hash
by thor (Priest) on Nov 15, 2005 at 22:51 UTC
    Well...you are using the push function and an array. If you want only one thing to be stored at that location, you'll want something like (untested):
    $hoh{$component}{$cmd}{$testcase} = { testsuite_type => $testsuite_type, platform_type => $platform_type, view => $view_type }

    thor

    Feel the white light, the light within
    Be your own disciple, fan the sparks of will
    For all of us waiting, your kingdom will come

      this worked for me.

      thanks a lot.
      rsennat
        Now that you're over your immediate problem, I suggest reading the intro to data structures. you can access it by typing "perldoc perldsc" at the command prompt. To see what other topics are available, type "perldoc perl". By no means am I discouraging you from asking questions, though. That's how we learn!

        thor

        Feel the white light, the light within
        Be your own disciple, fan the sparks of will
        For all of us waiting, your kingdom will come

Re^3: unique data in dynamic hash
by GrandFather (Saint) on Nov 15, 2005 at 23:10 UTC

    Show us what you want to achieve. Something like this:

    use warnings; use strict; use Data::Dumper; my %hoh; while (<DATA>) { my @items = split ' '; push @{$hoh{'this'}->{'that'}->{'theOther'} }, [@items]; } print Dumper (\%hoh); __DATA__ eggs bacon cheese tomatoes potatoes onions beans peas cabbage

    Perl is Huffman encoded by design.