Inline::CPR 0.12 review

by on

Inline::CPR is C Perl Run

License: Perl Artistic License
File size: 7K
Developer: Brian Ingerson
0 stars award from

Inline::CPR is C Perl Run. Embed Perl in C, ala Inline



int main(void) {

printf("Hello World, I'm running under Perl version %sn",
CPR_eval("use Config; $Config{version}")

return 0;

Is it C? Is it Perl? It's neither, it's both. It's CPR!

CPR (C Perl Run) is a "new language" that looks like C. You don't need to compile it. You just run it, much like Perl. As an added bonus, you'll get access to the full internals of Perl via the CPR API.

The idea is that you just put a CPR hashbang at the top of your C program and run it like a script. The CPR interpreter will run your C code under Perl.

If your 'hash' doesn't 'bang', you can run your program like this:

cpr synopsis.cpr


Inline::CPR 0.12 keywords