print "A?="; chomp(my $a=); print "B?="; chomp(my $b=); #get Ax**2+Bx+C values print "C?="; chomp(my $c=); my $ans1=(($b x -1)+sqrt(($b**2) - 4 x $a x $c)) / (2 x $a) or die "Unreal answer!\n"; #note the ugliness of ($b x -1), any better way to get -$b? my $ans2=(($b x -1)-sqrt(($b**2) - 4 x $a x $c)) / (2 x $a); print "Answers: $ans1 AND $ans2\n\n";