If the the value of $outhash{$str} is undefined, you'll get a warning about using an undefined value.
Are you sure about that? Can you show code giving the warning? If you can construct code that generates a warning when ++ is applied to an undefined value, make sure to report it as a bug, because that's not supposed to happen.
This would work equally well:
$outhash {$str} ||= 0;
$outhash {$str} ++;
Yeah, but why bother? From the documentation about auto-increment and auto-decrement:
"undef" is always treated as numeric, and in particular is
changed to 0 before incrementing (so that a post-increment
of an undef value will return 0 rather than "undef").
Abigail