There's an a2p and an s2p; why isn't there a p2c (perl-to-C)?
Because the Pascal people would be upset that we stole their name. :-)
The dynamic nature of Perl's do and eval operators (and remember that
constructs like s/$mac_donald/$mac_gregor/eieio count as an eval) would
make this very difficult. To fully support them, you would have to put
the whole Perl interpreter into each compiled version for those scripts
using them. This is what undump does right now, if your machine has it.
If what you're doing will be faster in C than in Perl, maybe it should
have been written in C in the first place. For things that ought to be
written in Perl, the interpreter will be just about as fast, because the
pattern matching routines won't work any faster linked into a C program.
Even in the case of simple Perl programs that don't do any fancy evals, the
major gain would be in compiling the control flow tests, with the rest
still being a maze of twisty, turny subroutine calls. Since these are not
usually the major bottleneck in the program, there's not as much to be
gained via compilation as one might think.