#foreach my $item (keys %{$_[0]}){ # repl_mongo($key,$_[1]-1 ); foreach my $key (keys %{$_[0]}){ repl_mongo($_[0]->{$key},$_[1]-1 ); }