in reply to Extending perl with C dynamic library.
If you want to learn XS, there's a good book on it, I mean this one : Extending and Embedding Perl
Also, use proper tooling such as h2xs to generate the skeleton you need, and you can build on that.
In Section
Seekers of Perl Wisdom