in reply to Re: need to put values (from unpack) into array-ref
in thread need to put values (from unpack) into array-ref

yes, thats what I need (sorry for my short explanation).
Is there no way to insert these values directly into those array refs with push or something else ?
  • Comment on Re^2: need to put values (from unpack) into array-ref

Replies are listed 'Best First'.
Re^3: need to put values (from unpack) into array-ref
by davorg (Chancellor) on Mar 28, 2006 at 10:40 UTC
    Is there no way to insert these values directly into those array refs with push or something else?

    Well, you could directly assign each value to the next element off the end of each array with code like this:

    ($a[0][@{$a[0]}], $a[1][@{$a[1]}]) = unpack("x$i A1 A1", $b) ;

    But that's horrible!

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg