http://qs1969.pair.com?node_id=294589

ogilvy88 has asked for the wisdom of the Perl Monks concerning the following question:

I have a C program that uses the pthreads library on Linux (RH9). While I am a reasonable C programmer, I need to add some heavy RegEx code, and Perl is right for the job.

What I'd like to know is whether or not I'm likely to run into problems of mystical proportions if I try to integrate perl into this C program... the technical approach would be along the lines of that described here:

http://www.kfunigraz.ac.at/edvndwww/books/books/perl2/prog/ch21_04.htm

(although they don't say anything about threads... looks like the text is from pre 5.8.x's 'stable' threads.)

thanks!
  • Comment on integrating Perl into a C program... that uses threads

Replies are listed 'Best First'.
Re: integrating Perl into a C program... that uses threads
by asarih (Hermit) on Sep 27, 2003 at 03:45 UTC
Re: integrating Perl into a C program... that uses threads
by Roger (Parson) on Sep 27, 2003 at 13:50 UTC
    As a C programmer, be sure to check out the GNU libraries first! GNU has most of the stuff you need.

    You don't need to embed Perl in your C code. You need to use a native C regular expression library.

    Go and have a look at the GNU Rx library here. This is probably what you are looking for.

    PS. Are you using GLib for your C programming? If not, I suggest you check out GLib too. Believe me, you will save a lot of development time by using the GLib library.

      thanks folks ... I'll check out both of those resources. cheers, Ogilvy