Hi Robin,
Have a look at the module B::CC which does pretty much what you ask for. You
call it like this:
perl -MO=CC[,OPTIONS] foo.pl
This is from the standard documentation, there is also a section entitled
BUGS which says:
"Plenty. Current status: experimental."
So, you've been warned :-)
Mike Lacey
www.tek-tips.com -- a friendly, flame free, environment for computer
professionals and students
Perl forum at:
http://www.tek-tips.com/gthreadminder.cfm/lev2/4/lev3/32/pid/219
----- Original Message -----
From: "Robin Lavallee (LMC)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 27, 2001 1:44 PM
Subject: Perl regex to C
>
> Hi,
>
> I know you can run C programs from perl. I know you can run
> perl programs from C. My question is, is there a perl script (or any
> software)
> that is able to convert perl regex into valid C code ?
>
> Perl is wonderful for matching expression, some software I have to
> deal
> with in C would benefit a lot from these regex; it would be great if I
could
> write the regex is perl, and convert it into C, pasting the resulting code
> into a function in my C program.
>
> Obviously I could also use a regex library for C but I would prefer
> to avoid that.
>
> Thanks,
> -Robin