Ich habe ein Script geschrieben das die Uhrzeit zerstückelt und aus externen Bildern zusammensetzt. Warum kommt der Speicherzugriffsfehler??
--
#!/usr/bin/perl -w
use GD;
$ = 1;
$time = localtime(time);
($sek,$min,$hour) = localtime(time);
$newtime = sprintf("%02d:%02d:%02d",$hour,$min,$sek);
$newesttime = $hour.$min.$sek;
binmode STDOUT;
$im = new GD::Image(11*6,14);
$x = 0;
for ($loop=1; $loop <=7;$loop++) {
&getgif($x,substr($newesttime,$loop-1,1),$im);
$x+=11;
print substr($newesttime,$loop-1,1);
}
print "Content-type: image/gif\n\n";
print $im->gif;
exit(0);
sub getgif {
local($x,$num,$im)=@_;
$ending = ".\gif";
open(GIF,$num.$ending);
$gif = newFromGif GD::Image(GIF);
$im->copy($gif,$x,0,0,0,11,14);
close(GIF);
}