in reply to Using C code in Perl

(re-posting my answer to a deleted question):

There are two good places i know of to look for XS documentation. One should already be installed on your machine.

Try 'perldoc perlxs' (or perlman:perlxs). The other is Sriram's book "Advanced Perl Programming". (See O'Reilly for details.) The last couple of chapters get into the guts (oh, perlman:perlguts too) of Perl data structures and such, and talk in great detail about embedding interpreters in other languages, calling and defining stubs, and all those hairy things.