sub foo($$); #two scalar arguments foo $bar; #error foo @bar; #error foo $bar, $baz; #ok foo $bar, @baz; #no error, but does it do what you want?