in reply to Re: unpack() to several variables
in thread unpack() to several variables

Maybe using an array slice? As in (untested):

my(@ids,$text,$length); (@ids[0..9],$text,$length) = unpack("N10C40n",$buff) ;

Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."

Replies are listed 'Best First'.
Re^3: unpack() to several variables
by Saladino (Beadle) on Jul 22, 2009 at 13:26 UTC
    Please, note that with those lines of code instead of geting the C40 to $text I get C1 to $text and C2 to $length