Thanks to Brad Hanson and Tim Endres for their kind replies. However, I forgot to mention that I would like to retain some portability across the Mac and Unix platforms. This makes the solution of sending scripts to MacPerl via AppleEvents less desirable. However, maybe embedding the Perl interpreter into a C application with CodeWarrior is just too hard (impossible)...?? Thanks again, Fil You wrote: >You could send an Apple event from your C program to the MacPerl >application. I've included some C source code at the end of this message >that will do this. If you have any questions let me know. > >Brad > > [code deleted] In reply to my original message: >Date: Sun, 25 Aug 96 19:09:26 -0700 >To: mac-perl@iis.ee.ethz.ch >From: fil@cs.ucsd.edu (Filippo Menczer) >Subject: [MacPerl] Embedding perl into my C application > >First of all thanks to Matthias Ulrich Neeracher for the >great work with MacPerl, and I apologize to the readers >if my question is trivial, but I am new at both Perl and >MacPerl, and I have looked at the FAQ and the mailing >list's archives, so far to no avail. Here is the question. > >I need to write my own Mac application in C, using >Metrowerk CodeWarrior. I also need to embed a Perl >interpreter into my application, so that I can execute >Perl scripts from my program (it is a Web application >for which I will use mainly the libwww-perl5 routines). > >I would like to do as the perlembed document instructs, >but where can I get the perl source that will compile on >CW (miniperlmain.c, perl.h, EXTERN.h, etc...)? The Unix >source requires of course a lot of adjustments and I am >not familiar enough with porting Unix programs to the Mac. >And, what perl library (libraries) do I need? Do they >exist for the Mac? (Of course Matthias must have done >this, but are they available?) Where could I get them? > >Is there an easier/more direct way to do this? >Any help would be greatly appreciated! > >If all this fails, I guess I would have to resort to >calling perl droplets from my C application with exec() >or system(), and invoke MacPerl 5 to compile and >execute them. However, I am afraid this would be inefficient >and perhaps even problematic as I understand that the exec() >implementation in CW (or on Macs in general) is shaky. >Not to mention complications for passing parameters. > >Thank you very much! >Filippo > >PS - you can assume PPC, CW 8, System 7.5.3, etc... ========================================================= Filippo Menczer fil@cs.ucsd.edu http://www.cs.ucsd.edu/users/fil/ Lab: (619) 534-8187 CSE Dept., 0114 Fax: (619) 534-7029 U. C. San Diego Home: (619) 587-7005 La Jolla, CA 92093-0114, U.S.A. =========================================================