I'm trying to run a perl script through C# code. The perl script takes a text file as input and creates two new files as output (doing some text processing in between). When I run the perl script through C# using the below code, it seems to start executing, but no files are created. Whats the problem? Syntax error?
ProcessStartInfo perlStartInfo = new ProcessStartInfo(@"c:\Perl\bin\perl.exe");
perlStartInfo.Arguments = "c:\\Perl\\DOC-MAT.pl " + "c:\\Perl\\comb1.txt" + "c:\\Perl\\comb1.mat";
perlStartInfo.UseShellExecute = false;
perlStartInfo.RedirectStandardOutput = true;
perlStartInfo.RedirectStandardError = true;
perlStartInfo.CreateNoWindow = false;
Process perl = new Process();
perl.StartInfo = perlStartInfo;
perl.Start();
perl.WaitForExit();
string output = perl.StandardOutput.ReadToEnd();
Here, comb1.txt is my input file, and comb1.mat and comb1.clabel should be the files getting created by the perl code.
C:\Perl? 2) Is it possible the files are being written to standard out and thus intostring output?