sub some_key { keys %{$_[0]} ? scalar each %{$_[0]} : undef } #### sub some_key { keys %{$_[0]}; scalar each %{$_[0]} }