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

Just downloaded Quartz.Net, read the documentation which is out of date and have ended
I just downloaded and ran the boost installer for version 1.42 (from boostpro.com), and
Ive just downloaded a free theme and after check the files out with a
I just downloaded Netty for a personal client-server-project from here: http://netty.io/downloads/netty-3.3.0.Final-dist.tar.bz2 On the download
I just downloaded it from http://www.mozilla.org/en-US/mobile Developer Tools You can install the mobile version
Just downloaded the new Kinect SDK Beta from Microsoft and am really excited to
I just downloaded the jQuery Succinctly free ebook ( here ) from Syncfusion and
I just downloaded a fresh Squeak-dev image from Damien Cassou, clicked on SqueakMap, and
I just downloaded the RJCrop from github featuring use of Paperclip with JCrop. I
I just downloaded PhProxy from here . When I went to some IP locator

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.