Click to See Complete Forum and Search --> : Mixing PERL and C++


madcompnerd
04-20-2003, 10:34 PM
I'm going to write a program that will need a GUI and will do a lot of text searching. I know C++ is horrible for text work, and PERL is wonderful for it.
Is it possible, and if so is there a good tutorial/info on how to, to call a PERL script from C++ in a way that it will be totally hidden from the user? Meaning, I don't want to make a shell call and have them see the PERL script running in a console.

Heh, also I want end product to do this in Windows :-O. But mostly I'm curious how to mix the two together.

Oh, I'm also considering using Java instead of C++. I don't know how Java is on text, but it can't beat PERL can it? Yes, I know C++ gui API's are much faster than Java's.

Stuka
04-21-2003, 02:07 PM
IMHO, you'll have better luck using the C++ library functions (string, etc.) than trying to integrate Perl into C++. However, if you're dying to use Perl, you might check into the Win32::XXX modules for Perl. IIRC, there's even a Win32::GUI module, which lets you create Win32 GUIs in Perl. Needless to say, this won't help at all in making it cross platform, but that doesn't appear to be your goal.

madcompnerd
04-21-2003, 05:06 PM
Hmm, yea writing the whole thing in PERL doesn't sound like much fun. The only reason I'm aversed to using totally C++ is that it tends to be slow with strings.

Stuka
04-21-2003, 05:23 PM
C++ isn't slow with strings...it's just that you can't use the regexes like you do in perl...oh, but wait, you can! There's a boost::regex library at http://www.boost.org - check it out, and you'll swear off perl!