in reply to need to put values (from unpack) into array-ref
Maybe this more succinctly captures the essence of what your code has to do?
#! perl -slw use strict; use Data::Dumper; my $b = "abefcdghijklmn"; my @a; @{ $a[ 0 ] } = ( 'start 0', unpack '(A1x)*', $b ); @{ $a[ 1 ] } = ( 'start 1', unpack '(xA1)*', $b ); print Dumper \@a; __END__ C:\test>539664 $VAR1 = [ [ 'start 0', 'a', 'e', 'c', 'g', 'i', 'k', 'm' ], [ 'start 1', 'b', 'f', 'd', 'h', 'j', 'l', 'n' ] ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: need to put values (from unpack) into array-ref
by BrowserUk (Patriarch) on Mar 28, 2006 at 11:03 UTC | |
by japhy (Canon) on Mar 28, 2006 at 13:57 UTC | |
by jeanluca (Deacon) on Mar 28, 2006 at 11:16 UTC | |
|
Re^2: need to put values (from unpack) into array-ref
by ikegami (Patriarch) on Mar 28, 2006 at 17:02 UTC |