This is somewhat of a contrived example. I can't think of any subroutine in perl that I've written, or interfaced with, or seen in production code, that takes multiple types beyond the first argument. If any function is doing that, the function is too complex and should be refactored. What you do see a lot of is stuff of the forms:
sub foo {
my($someflag, @subjects) = @_
sub foo {
my($self, %options) = @_
sub foo {
my($positional, %named) = @_
etc. And in fact, when the way you call these is the 90% case for functions, at least in perl. sub dosomething_with_data(@) { ... }
@data = (1, 2, 3);
@moredata = (4, 5, 6);
dosomething_with_data(@data, @moredata);
sub invoke(%) { ... }
%common_opts = (a=>1, b=>2);
invoke(%common_opts, c=>3);
invoke(%common_opts, c=>6, d=>5);
%overrides = (b=>3);
invoke(%common_opts, %overrides, c=>6);
(I included the subroutine prototypes for clarity). In this case, perl is exactly DYIM without the programmer having to think about list folding, array splicing, or hash merging. It just works. This would appear to be true dynamic typing, rather than dynamic typing where I still need to be strict about how I handle the values.
(I believe, in my own Perl, I used to work around this issue by using a lot of objects to encapsulate my hashes and arrays.)
Correct me if I'm wrong. I was never the world's most expert Perl programmer, I haven't used the language in several years, and Perl may have improved since I left.
---
[1] Not that there isn't more than one way to do it.