Hi,
ich habe den Code jetzt zu folgendem geändert:
#!"\xampp\perl\bin\perl.exe" -w
use CGI::Carp qw(fatalsToBrowser);
use POSIX qw(ceil floor);
use strict;
my $pics_nr = 105;
my $pics_seiten = ceil($pics_nr/16);
my $pics_count = 0;
my $pics_name = 1;
my $pics_break = 1;
my $page_name = 1;
for (my $i = 1; $i <= $pics_seiten; $i++) {
open($page_name,">$page_name.html") || die("FEHLER: Datei kann nicht geschrieben werden...");
print $page_name "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
print $page_name "<html><body>";
print $page_name "<center><table>";
print $page_name "<tr>";
while ($pics_count <= 16) {
if ($pics_breack == 1) {print $page_name "<tr>"}
$pics_count++;
print $page_name "<td><img src=\"img/$page_name.jpg\" /></td>'";
$pics_name++;
if ($pics_break == 4) {print $page_name "</tr><tr>"; pics_break = 1;};
$pics_brack++;
}
if ($pics_break != 4) {print $page_name "</tr>"; pics_break = 1;};
print $page_name "</table></center>";
print $page_name "</html></body>";
close($page_name);
$page_name++;
$page_count = 1;
}
Jetzt wir mir noch folgende Fehlermeldung angezeigt:
Software error:
Global symbol "$pics_breack" requires explicit package name at C:/xampp/htdocs/cw/pic.cgi line 24.
Global symbol "$pics_brack" requires explicit package name at C:/xampp/htdocs/cw/pic.cgi line 29.
Global symbol "$page_count" requires explicit package name at C:/xampp/htdocs/cw/pic.cgi line 37.
Bareword "pics_break" not allowed while "strict subs" in use at C:/xampp/htdocs/cw/pic.cgi line 28.
Bareword "pics_break" not allowed while "strict subs" in use at C:/xampp/htdocs/cw/pic.cgi line 31.
Execution of C:/xampp/htdocs/cw/pic.cgi aborted due to compilation errors.