Chapter 41. Compiler Backends

To compile a Perl program foo.pl with the C backend, use:

perlcc -o foo foo.pl

To produce a cross-reference report of the line numbers at which all variables, subroutines, and formats are defined and used, use:

perl -MO=Xref,-d foo.pl

To see what Perl compiles your program into, use:

perl -MO=Deparse foo.pl

This shows exactly the precedence of Perl operators:

perl -MO=Deparse,-p foo.pl

The compiler backends are experimental.

perlcc, perlcompile.

Get Perl Pocket Reference, 4th Edition 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.