Another recommendation for SWIG. I chose to use SWIG since it seemed much easier than learning the guts of XS.
In addition to the paper linked by zentara, which is a bit old, you'll also want to consult the SWIG and Perl5 chapter in the manual from the documentation on the SWIG website.