tags:

views:

57

answers:

2

I need to get an array from Perl script to Java program.

Can we directly access that variable in Perl directly from Java, or is there any way to return that array from the Perl program to the Java program?

+2  A: 

A simple solution to transfer data from one process to another (no matter what language) is to use serialized strings.

Serialize your array to eg. a JSON String and deserialize it in the target process. If its a really simple data format, you could also use a field delimiter and simply concatenate the array fields with the delimiter.

You wont get a more specific answer without furhter details about your problem. Are those other questions of you really unanswered? Please dont forget to accept answers if a problem is solved!

tweber
+1  A: 

For accessing Java class from Perl, I would suggest Inline::Java. Once you have that interface running you can easily pass different data structures.

ppant