home *** CD-ROM | disk | FTP | other *** search
/ Internet 1996 World Exposition / park.org.s3.amazonaws.com.7z / park.org.s3.amazonaws.com / cgi-bin / Japan / Theme / rand_select_sjapan.cgi < prev    next >
Text File  |  2017-09-21  |  386b  |  23 lines

  1. #!/usr/local/bin/perl
  2.  
  3. #
  4. # rand_select_sjapan.cgi
  5. #    randam selection of sjapan icon for sensorium top page
  6. #
  7. @file = ('sj1.gif','sj2.gif','sj3.gif','sj4.gif','sj5.gif');
  8.  
  9. {
  10.     local(@temp);
  11.     srand;
  12.     push(@temp, splice(@file, rand(@file), 1))
  13.         while @file;
  14.     @file = @temp;
  15. }
  16.  
  17. print "Content-type: image/gif\n\n";
  18. open(F, "top_sjapan_icons/@file[0]");
  19. while (<F>) {
  20.     print $_;
  21. }
  22. close(F);
  23.