in reply to What is the difference: Calling a (c based) program OR inline c code

The big difference is that if you call an external program, it's a different program. It's completely separate. If it crashes, your main program still runs. If it uses a lot of memory, the memory is released when the external program exits.

If you extend Perl, you can do a lot more. You can peek inside Perl variables - even change them directly. You can walk the OP tree. And many more things.

It'll depends on the specifics of the problem you want to solve what your best action is. There's no general rule.

  • Comment on Re: What is the difference: Calling a (c based) program OR inline c code