#!/usr/bin/perl -w use CGI::Carp qw(fatalsToBrowser); print "content-type: text/html \n\n"; #The header my $HTML = "myhtml.html"; open (HTML) ; my @fileinput = ; my $z = "

Bitte Geben sie die gewünschte Zahl ein:

"; print "$z"; # Hier sollte man die Variable $a eingeben koennen. my $zz = "

Und hier bitte die Potenz:

"; print "$zz"; #Und hier die Variable $b my $c = $a; if ($b == 0) { print "Lösung = 1 \n"; exit; } else { if ($b >= 0) { for (my $i = 1;$i <= $b - 1;$i = $i + 1) { $a = $a * $c; } } else { $a = 1/$a; $c = 1/$c; for (my $j = -1;$j >= $b + 1;$j = $j - 1){ $a = $a * $c; } } } print "Lösung =",$a,"\n"; close (HTML)