|
Hi!
I successfully installed PLJava und now I'm trying to make the example code run.
String s2 = Perl.eval(" 'time: ' + time() ") ;
--> s2 is set to "1238255955". Is that what it should be?
int i = Perl.eval_int(" 2**10 ") ; // 1024
--> i is set to 1024. Looks correct to me.
int n = Perl.eval_int(" 10/3 ") ; // 3
--> n = 3. Correct
SV array = Perl.eval_sv(" [ 'a' , 'b' , 'c' ] ") ;
String e0 = array.elem(0) ; // a
String e1 = array.elem(1) ; // b
String e2 = array.elem(2) ; // c
--> e0, e1 and e2 are all empty strings. :-(
SV hash = Perl.eval_sv(" { a => 11 , b => 22 , c => 33 } ") ;
String k_a = hash.key("a") ; // 11
String k_b = hash.key("b") ; // 22
String k_c = hash.key("c") ; // 33
--> k_a, k_b, k_c are all empty strings, too.
What am I doing wrong? |