in reply to Assigning value to the array elements
use List::MoreUtils qw(pairwise); my ($first, $second, $third, $fourth, $fifth, $sixth); my @vars = \($first, $second, $third, $fourth, $fifth, $sixth); my @aarr = ('<chap', '<book', '<isb'); print {$,=' '; \*STDOUT} pairwise { ${$a} = $b} @vars, @aarr;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Assigning value to the array elements
by anniyan (Monk) on Oct 28, 2005 at 14:55 UTC | |
by no_slogan (Deacon) on Oct 28, 2005 at 15:08 UTC |