in reply to Sending packed arrays from Perl to C
You use integers in getangles so pack them as integers.
With these changes the code works on my machine.
You want to add each row to packedMatrix rather than overwrite it each time.# my $packedRow= pack("f$width", @$avRow); my $packedRow= pack("i$width", @$avRow);
# $packedMatrix = pack("p", $packedRow); $packedMatrix .= pack("P", $packedRow);
With these changes the code works on my machine.
In Section
Seekers of Perl Wisdom