1: #!/usr/bin/perl
2: # CGI Animated GIF Pusher
3:
4: # Harkening back to the days before GIF89, I needed one of these
5: # today. So, I wrote one and it works. But, as it turns out, not
6: # with the joy that is IE. Netscape, no problem.
7:
8: print "Content-type: multipart/x-mixed;boundary=myboundary\n\n";
9: print "myboundary\n";
10: $| = 1;
11: @images = ('green.gif','blue.gif','red.gif');
12: foreach $image (@images) {
13: print "Content-Type: image/gif\n\n";
14: open IMAGE,"<$image" or die "bad image, $image";
15: print <IMAGE>;
16: close IMAGE;
17: print "\nmyboundary\n";
18: sleep 2;
19: }