Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use List::MoreUtils qw{ any pairwise };
- @a = (100, 243);
- @b = (92, 73);
- @x = pairwise { ($a - $b)**2 } @a, @b;
- print "\@a == @a\n";
- print "\@b == @b\n";
- print "\@x == @x\n";
- @p = (100, 243);
- @q = (92, 73);
- @y = pairwise { ($p - $q)**2 } @p, @q;
- print "\@p == @p\n";
- print "\@q == @q\n";
- print "\@y == @y\n";
Add Comment
Please, Sign In to add comment