-2

I want to capture output of C# application in Perl Script, process same and then send out the EMail Notification. I am aware of the Email Notification part just looking for data retrieval from C# application to my Perl script.

  • 3
    Welcome to StackOverflow. Since you've given us no information about the C# application, it's impossible to answer your question. How does the C# app provide the output you want to capture? Via the console? In a window? Please edit your question to add enough information so we can try to help you. We can't see your screen from here or read your mind. We only have the information you give us in your question. If you don't tell us, we don't know about it. :-) – Ken White Aug 25 '12 at 05:28

2 Answers2

3

a C# app is still an app, so as long as its a console app and supports stdout and stderr, you shouldn't have any particular trouble capturing the output to stdout. check out this thread for details: How can I run an external command and capture its output in Perl?

Community
  • 1
  • 1
Frank Thomas
  • 2,434
  • 1
  • 17
  • 28
  • 1
    Nothing in the question indicates that the C# app is a console app, or that it outputs to stdout or stderr. – Ken White Aug 25 '12 at 05:46
0

Use the Console.WriteLine in the C# program. This writes into the STDOUT. In the Perl script use backticks to capture the STDOUT of the C# program.

Theo Lenndorff
  • 4,556
  • 3
  • 28
  • 43
  • Nothing in the question indicates that the source of the C# app is available to modify, or that it outputs to the console (STDOUT). – Ken White Aug 25 '12 at 05:44