in reply to adding n-tuples
#!/usr/bin/perl -l # https://perlmonks.org/?node_id=11100080 use strict; use warnings; use List::Util qw( sum ); my @A = (1, 1, 1, 1); my @B = (2, 2, 2, 2); print sum map eval tr/x/*/r, glob join 'x', map "{$A[$_],$B[$_]}", 0 . +. $#A;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: adding n-tuples
by LanX (Saint) on May 16, 2019 at 15:41 UTC | |
by tybalt89 (Monsignor) on May 16, 2019 at 16:46 UTC |