Update: fixed off-by-one errormy $n = $ARGV[0] || 5; my @terms = qw( a[0][0] a[0][1] ); foreach my $i (1 .. $n-1) { @terms = map { ("$_ a[$i][0]","$_ a[$i][1]") } @terms; } foreach my $i (0 .. $#terms) { print "term[$i] = $terms[$i]\n"; }
In reply to Re: Obtaining terms in an expansion
by trammell
in thread Obtaining terms in an expansion
by randyk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |