I have a struct wich contains:
struct mystruct{
int id[10];
char text[40];
unsigned short int len;
};
And I'm trying to unpack it in a single line, something like this:
my(@ids,$text,$length) = unpack("N10C40n",$buff) ;
But everything is going to the first array(@ids), i've tried templates as "N10 C40 n
" and "(N10)(C40)(n)
"
So, either this can't be done or I'm not using the proper template string.
Note: I'm using big endian data.
Any hints?