in reply to Passing a scalar and hash as subroutine arguments

This a quick demonstration of what is going on under the Perl debugger:
DB<1> @c = ('jan', 1, 'feb', 2, 'mar', 3); DB<2> x \@c 0 ARRAY(0x80359de8) 0 'jan' 1 1 2 'feb' 3 2 4 'mar' 5 3
So, @c is an array.
DB<3> %d = @c; DB<4> x \%d 0 HASH(0x8042f6d8) 'feb' => 2 'jan' => 1 'mar' => 3
Copying @c into %d sorts of promote the data structure into a hash (provided the number of elements is even). This is what happens in your code snippet. The @_ array contains just a flattened list. $header take the first element of @_, and the rest of @_ is copied into the %types hash.