Jul 27, 2013, 8:08 AM
Post #3 of 3
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.)
Re: [ningji] Q: function pass in struct pointer, come back with data filled
[In reply to]
Laurent's answer is probably the best perl solution to the same type of problem that your c function would be used for.