[Question] Should I bother trying to convert a perl script to play nicer with my WPF app?

My boss has asked me to incorporate a perl script we use to provision devices into my application which does a host of other things for provisioning.
Right now I'm not pleased with the way I am getting the perl script to redirect to my app and I feel as though either I'm doing it wrong or I should just convert the entire script to c#.
At the moment I'm launching perl.exe and the script as a new Process and redirect the output.

Because this script has menus and submenus, the solution I came up with for turning it into a UI is by parsing the output for static strings, like

if (output.Contains(specificString)) { textBlock.Text = specificString; } 

Imo it's a clunky, messy, non-update friendly way of doing this, but it's the only way I can think of without rewriting this script.

by ExceptionallyStrange via /r/csharp

Leave a Reply