in reply to calling C function from Perl
Also you can look at the Inline module, it comes with a tutorial.
Cheers, KM