#!/usr/bin/perl use strict; my ($a, $b, $c); my $max = shift || die "Usage: pythag.pl \n"; for ($a=1; $a<$max; $a++) { for ($b=1; $b<$max; $b++) { for ($c=1; $c<$max; $c++) { if ((($a**2) + ($b**2)) == ($c**2)) { print "$a $b $c is a winner\n"; } } } }