in reply to including perl dynamically into C

Or you could the other way and embed C in perl with the marvellous Inline::C. Or back again and embed perl in C with another fantastical creation from Brian Ingerson Inline::CPR.
HTH

_________
broquaint