Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

integrating Perl into a C program... that uses threads

by ogilvy88 (Initiate)
on Sep 27, 2003 at 02:15 UTC ( #294589=perlquestion: print w/replies, xml ) Need Help??

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://294589]
Approved by jdtoronto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2022-10-02 12:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (8 votes). Check out past polls.

    Notices?