B
bravetanveer
Hi friends,
I am facing a problem with hashes::
My hash is declared as below::
%HashTestSuites_TestCases = (
"ts_Apu" => [ "tc_Apu2LevelForNegIndexTernary",
"tc_Apu2LevelForsobelEDBenchmark_16_16",
tc_Apu2LevelForsobelEDBenchmark_88", "tc_ApunoNest",
"tc_ApuUgdOnceReservZeroReserv"],
"ts_DB_LoopFuse" => ["tc_DL_1LevelForDwt",
"tc_DL_2LevelFor2FilesMacro", "tc_DL_2LevelForNegIndexTernary",
"tc_DL_2LevelForSobelBenchMark", "tc_DL_2LevelForStructIntArray",
"tc_DL_2LevelForStructShortArray", "tc_DL_4LevelForNoHB_LaplaceED",
"tc_DL_forInSwitchCase", "tc_DL_noNest", "tc_DL_ugdMultReuse"]
);
foreach $testSuite ( keys %HashTestSuites_TestCases )
{
my $temp = scalar ( $HashTestSuites_TestCases{$testSuite} );
print "Size is $temp ";
print "Size is $#HashTestSuites_TestCases{$testSuite} ";
}
both of the print statements do not give me size. As far as i know
these are the only ways to get size of array .
Why am i not getting the size printed of the list to which teh key is
pointing to ???
I am facing a problem with hashes::
My hash is declared as below::
%HashTestSuites_TestCases = (
"ts_Apu" => [ "tc_Apu2LevelForNegIndexTernary",
"tc_Apu2LevelForsobelEDBenchmark_16_16",
tc_Apu2LevelForsobelEDBenchmark_88", "tc_ApunoNest",
"tc_ApuUgdOnceReservZeroReserv"],
"ts_DB_LoopFuse" => ["tc_DL_1LevelForDwt",
"tc_DL_2LevelFor2FilesMacro", "tc_DL_2LevelForNegIndexTernary",
"tc_DL_2LevelForSobelBenchMark", "tc_DL_2LevelForStructIntArray",
"tc_DL_2LevelForStructShortArray", "tc_DL_4LevelForNoHB_LaplaceED",
"tc_DL_forInSwitchCase", "tc_DL_noNest", "tc_DL_ugdMultReuse"]
);
foreach $testSuite ( keys %HashTestSuites_TestCases )
{
my $temp = scalar ( $HashTestSuites_TestCases{$testSuite} );
print "Size is $temp ";
print "Size is $#HashTestSuites_TestCases{$testSuite} ";
}
both of the print statements do not give me size. As far as i know
these are the only ways to get size of array .
Why am i not getting the size printed of the list to which teh key is
pointing to ???