in reply to Calling Perl script from windows form
You can run external programs from C#, a quick Google brings up, for example, this. You would be calling perl.exe (or wperl.exe) with the appropriate arguments, i.e. the pathname of your script and any other arguments.
I've found it's helpful to use absolute pathnames, and also to write the script such that it does not make any assumptions about the current working directory (it can use FindBin to figure out its location). A caveat: Using full pathnames means that those need to be hardcoded or configured, making the application a little less easy to move between differently laid out machines. I've found that in a somewhat controlled environment, full pathnames have been more helpful than not, others may disagree.
As for really "integrating" Perl into C#, as in integrating an interpreter into your application, I'm not sure if that's possible or how easy or not it is. Maybe some other Monks have some experience on that. Apparently ActiveState offers some kind of .NET "integration".
Lastly, as the other anon has pointed out, you can write GUIs in Perl (but then they wouldn't have anything to do with C#).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Calling Perl script from windows form
by RonW (Parson) on Apr 30, 2014 at 16:44 UTC |