#!c:\perl\bin\perl.exe -w use strict; my @imgArray = ( { file => "./pics/blink.gif", h => 320, w => 240, title => "Blink 128 (1)", }, { file => "./pics/sum41.gif", h => 316, w => 500, title => "Sum 41", }, #and so on ... ); #dont use srand, unless you want a PREDICTABLE series of numbers every time! my $num = rand(@imgArray); my $img = $imgArray[$num]; print "Content-type: text/html\n\n"; print < Index: $num
Image: $$img{file}

Random imaging with Perl.....




$$img{title}
HTML