{ my($a,$b,$c); ... } #### from { 1..30} my $a from {1..$a} my $b from { 1...$b} my $c; @results = take { [$a,$b,$c] if $a**2 +$b**2 ==$c**2 }