Re: How to pass array from java to perl using inline java



According to the output you've posted, you've succeeded. Perl is
reporting you have an array of pointers to other arrays of numbers.
The question now is how to read the contents of the arrays that were
returned from java.

All languages do not store their numbers in the same way, so the way a
floating point number is stored in Java may not be compatible with the
way Perl stores it. The IEEE defines a standard format for
representing floating point numbers in memory.

If both Perl and Java are IEEE compliant for floating point numbers,
you should have little translation problems between the two languages
(in that if you experiment with the different ways of using arrays in
Perl, one of them should automatically work with what Java returned).
Sorry, I don't know if Perl is IEEE compliant, although I know Java
is.


Inline::Java::Array=ARRAY(0xa52e234)




.



Relevant Pages

  • Re: Idiom for array index that Im foreaching over?
    ... >>you'll find that you rarely want to loop over an index. ... With hashes, indexed access, and hence loops ... > simplicity and elegance that I expect out of good modern Perl ... If, for some reason, the data is given in individual arrays, there are ...
    (comp.lang.perl.misc)
  • Re: Fw: question
    ... As a matter of fact Perl has: ... With the above functions and arrays and hashes there are very few data ... Also, PHP is a very different language then Perl, remember that. ... What happens if I add or remove keys from a hash while iterating over it? ...
    (perl.beginners)
  • Re: delimited data into nested array
    ... > Perl as a two dimensional nested array. ... Do you have a good reason for reading the file into an array ... If you'd still like to use the arrays, read up on perllol and use this: ... This whole loop was condensed above by using join, $\, and that handy ...
    (comp.lang.perl.misc)
  • Re: SET Operations in Perl
    ... Those are good if you have sets in arrays. ... But if you have to store sets in Perl then arrays are not the natural type. ... Some what one usually thinks of as the primative set operations are not ... primative in this implementation but the primatives you do have are ...
    (comp.lang.perl.misc)
  • Re: math operations
    ... I just want to know if I can do the following things with perl: ... However, from the series of articles you've been posting lately, it ... helping people to help you, you don't have clear ideas about ... "arrays with their elements being bits". ...
    (comp.lang.perl.misc)