How to execute perl script from C#.net code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SmartPHP
    New Member
    • Jul 2007
    • 22

    #1

    How to execute perl script from C#.net code

    Hey friends

    It will be a great help for me if any one could help me.I have one perl script file..and i want to execute the code in that file through my c#.net code in a web application...b ut i don't know how to do that.

    I tried it with System.Diagnost ics.Process but i'm not able to run the script.I'm using the VS2005 and ASP.NET inbuilt server.

    if possible pls provide me a small code also...
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    Originally posted by SmartPHP
    Hey friends

    It will be a great help for me if any one could help me.I have one perl script file..and i want to execute the code in that file through my c#.net code in a web application...b ut i don't know how to do that.

    I tried it with System.Diagnost ics.Process but i'm not able to run the script.I'm using the VS2005 and ASP.NET inbuilt server.

    if possible pls provide me a small code also...
    Unfortunately, here in the Perl forum, we really know nothing of C#, so I will move this over to the .Net forum so they can better answer your question.

    Regards,

    Jeff

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      Please don't double post.


      Well to run a perl script you would do something like:
      "(complete path to perl executable)\per l (perlscript filename)"
      and I believe you would send things to the standard input for processing.


      Another thought would be to just host it on a webserver somewhere and use HttpWebRequest to talk to it

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by SmartPHP
        Hey friends

        It will be a great help for me if any one could help me.I have one perl script file..and i want to execute the code in that file through my c#.net code in a web application...b ut i don't know how to do that.

        I tried it with System.Diagnost ics.Process but i'm not able to run the script.I'm using the VS2005 and ASP.NET inbuilt server.

        if possible pls provide me a small code also...

        Why don't you post the code you tried and explain where it failed?

        Comment

        Working...