my $h = ($a**2 + $b**2) ** (1/2); if ($h == int $h) { print "$a $b $h is a winner\n"; }