Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 565741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:54:13+00:00 2026-05-13T12:54:13+00:00

just downloaded ActivePerl. I want to embed the perl interpreter in a C# application

  • 0

just downloaded ActivePerl. I want to embed the perl interpreter in a C# application (or at least call the perl interpreter from C#). I need to be able to send send out data to Perl from C#, then receive the output back into C#.

I just installed ActivePerl, and added MS Script Control 1.0 as a reference. I found this code on the internet, but am having trouble getting it to work.

 MSScriptControl.ScriptControlClass Interpreter = new MSScriptControl.ScriptControlClass();
Interpreter.Language = @"ActivePerl";
string Program = @"reverse 'abcde'";
string Results = (string)Interpreter.Eval(Program);
return Results;

Originally, it had ‘PerlScript’ instead of ‘ActivePerl’, but neither work for me. I’m not entirely sure what Interpreter.Language expects. Does it require the path to the interpreter?

Solved… I’m not sure how, but when I changed it back to PerlScript it works now. Still, I would like to know if MSScript Control is using ActivePerl or another interpreter.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:54:13+00:00Added an answer on May 13, 2026 at 12:54 pm

    I am not sure about the script control but I have done a similar thing where I had to ’embed’ spamassasin (which is a Perl program). I basically used the Process to do the job. Something along the lines of:

    var proc = new Process
        {
            StartInfo =
            {
                FileName = "perl",
                WorkingDirectory = HttpRuntime.AppDomainAppPath,
                Arguments = " myscript.pl arg1 arg2",
                RedirectStandardOutput = true,
                RedirectStandardError = true,
                RedirectStandardInput = true,
                UseShellExecute = false
            }
        };
    proc.Start();
    proc.StandardInput.BaseStream.Write... // feed STDIN
    proc.StandardOutput.Read... // Read program output
    var procStdErr = proc.StandardError.ReadToEnd(); // errors
    proc.StandardError.Close();
    proc.StandardOutput.Close();
    proc.WaitForExit(3000);
    int exitCode = proc.ExitCode;
    proc.Close();
    

    This obviously not just Perl specific and it has the process creation overhead, so if you are running your script too often probably you need to think of a different solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First thing when I try to run the application (I just downloaded it from
I just downloaded MonoDevelop for my Mac, but I cannot figure out how to
I just downloaded Ruby 1.9.2, and I want it to completely replace the older
i've just downloaded the Yahoo BOSS Mashup framework from http://developer.yahoo.com/search/boss/mashup.html , and I have
I'm newbie in Android application development. I just downloaded all SDks and Eclispe. Then
I downloaded Xcode 4.0.2 just a while back. I am not able to connect
So I downloaded a wrapper class from this github link: https://github.com/ignaciovazquez/Highrise-PHP-Api and I'm just
I just downloaded Eclipse several hours ago, and needed to add Java3D to the
I just downloaded the ASP.NET MVC beta and wanted to walk through the quickstarts
I just downloaded MVC and I am going through a tutorial. Everything goes fine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.