sub rscalar { my($count); map { $count++; if (ref eq "ARRAY") { $count = $count + rscalar(@{$_}); } } @_; return $count; }