in reply to No: of values in a hashtable

Sometimes it's very helpful to write a small example (as you have done in your OP) and see the result. Data::Dumper and Data::Dump are very useful for this.

>perl -wMstrict -le "use Data::Dumper; ;; my %hash; ;; push @{ $hash{'one'} }, qw(fee fie foe fum), undef, 'oops'; print Dumper \%hash; ;; my $defined_pushed = grep defined, @{ $hash{'one'} }; print $defined_pushed; " $VAR1 = { 'one' => [ 'fee', 'fie', 'foe', 'fum', undef, 'oops' ] }; 5

See also Basic debugging checklist.