CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
Running perl from java


New User

Jan 5, 2011, 11:21 PM

Post #1 of 1 (1010 views)
Running perl from java Can't Post

Greetings all, I want to execute perl code from within a java application. For example I pass the following command to my java application:

perl args...

This works fine and I am able to capture the script's output in my java code. However if I use the "-e" command-line option, the perl program is successfully executed but my java program shows that no output is produced. For example:

perl -e "print \"Hello World\""

My guess is that the perl interpreter works differently with the "-e" option than it does when reading and executing a perl script. I would like someone to tell me how to run a perl program using the "-e" option and capture its output in my java code. I am running perl 5.8.6 for MSwin32-x86-multi-thread on Microsoft Windows 2000 Version 5.00.2195 and Sun Microsystems java version 1.6.0_21



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives