It is not possible to do exactly what you are asking because perl's concept of type is much different from C's. Perl's hash is similar to C's struct, but not at all the same. Perl's hash keys are very similar to C's structure members. Perl's reference is similar to C's pointer, but again, not the same. Perl's function prototypes appear to be similar to C's, but they are not! (In fact, they are almost never needed or appropriate.)

Laurent's answer is probably the best perl solution to the same type of problem that your c function would be used for. Good Luck, Bill