I may be totally wrong, but I always thought that the advantage of static typing had mostly to do with speed and size. For example in the following sub, every time it runs it has to first look up what type of object $thing is and then check to see if that type of object has a "to_xml" method.
sub foo{
my $thing = shift;
print $thing->to_xml;
}
But in the following (probably bad) C++ code, the function can be looked up just once at compile time, because the function knows what type of object 'thing' will be:
void foo(bar thing){
cout << thing.to_xml();
}
Yet another layer is added when you use overloading. Let's say that a variable is used in a concatenation, perl must first determine what if any class of object that variable belongs to. If the variable does belong to a class it must determine if that class has the concatentation operator overloaded, if it does then in must determine if the subroutine exists that it is overloaded with, and then it calls that subroutine. In a static typed language this only has to be done once at compile time.
The size difference shows most with ints and chars. As I understand it in perl every scalar is a C struct. If a variable is only ever going to be an int, then it is a waste to make a struct for it.
I am not saying that static typing is better, but I think there are some speed and size advantages.