Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
push @{ $weekly_hash{$i} },"mon","ret","tue","retik","wed","true"; $value_count=grep {defined} values %weekly_hash; print $value_count;
Hi, In the above code, i am checking the number of values corresponding to key 1 .For key 1 i have 6 values.But as per the code its returning the count as 1.Please help.For my requirement i need to dynamically create the array.So have used push statement.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: No: of values in a hashtable
by choroba (Cardinal) on Sep 17, 2012 at 12:17 UTC | |
|
Re: No: of values in a hashtable
by tobyink (Canon) on Sep 17, 2012 at 12:27 UTC | |
|
Re: No: of values in a hashtable
by AnomalousMonk (Archbishop) on Sep 17, 2012 at 20:19 UTC | |
|
Re: No: of values in a hashtable
by kcott (Archbishop) on Sep 18, 2012 at 06:15 UTC |