What Is the Inline Module?

You can combine C and Perl in several different ways. One of the most common is to use C to create a Perl module. This is useful and flexible, but it is complex and difficult to get right. Also you have to know a bit about Perl’s internals to create a really good module.

Another way of marrying C and Perl is to use the embedded Perl interpreter. But again, the process is not as easy as it looks, and you have to know a lot about the internals of Perl.

Finally, you can use the Inline module. This module lets you put your C code in your Perl program. When the code is needed, the module compiles and loads it for you. This method avoids many of the hassles of dealing with both languages. In fact, the Inline module goes ...

Get Perl for C Programmers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.