Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calling java program from perl

Status
Not open for further replies.

sun9

Programmer
Dec 13, 2006
31
US
Is it possible to call a java program through my perl code and use the return value from the java program in my perl program?
 
Don't see why not, as long as it writes its output to STDOUT. Might be a bit slow if you are calling it inside a loop, repeatedly.
Code:
my @javaOut = qx{java myprog......etc};

print $_ for (javaOut);

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top