$ perl -le' my @b = 21 .. 31; print scalar @b; my $x = 3; my $length = 49; my @a = ( $x, ( @b ) x $x, ( 0 ) x $length )[ 0 .. $length - 1 ]; print scalar @a, ": @a"; ' 11 49: 3 21 22 23 24 25 26 27 28 29 30 31 21 22 23 24 25 26 27 28 29 30 3 +1 21 22 23 24 25 26 27 28 29 30 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
In reply to Re: I need some wisdom. How do I pack an array to a set length.
by jwkrahn
in thread I need some wisdom. How do I pack an array to a set length.
by Fighter2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |