in reply to compile c code
You can invoke a C compiler with system or qx - I don't think there's a Perl module that implements a complete C compiler.