I have Perl Code and C Code and I am calling C functions in my Perl Code. I have passed a float array from Perl to C by packing it (like this http://www.perlmonks.org/?node_id=39697) and it works nicely!
my $p_angle = pack("f*", @angle);
But now I am trying to return that array from my C function to Perl and I want to be able to do stuff with it, e.g read values, print...
I have tried to unpack it with
my @array = unpack("f*", $entropy);
but that does not work at all, I always see the same not reasonable values when I print the @array.
So I guess I am doing it wrong, does anybody know how to unpack the array properly?