test.pl -------------------- use hello qw(addint); my $a=addint(9, 16); print "$a\n"; exit; hello.pm ------------ package hello; use strict; require Exporter; @ISA=qw(Exporter); @EXPORT_OK=qw(addint); use Inline (C => 'cfunction/addint.c'); 1; addint.c ----------------------------- int addint(int x, int y) { return x + y; }