Thanks in advance for your guys' help.#! /usr/bin/perl $urldir = "http://jason.yellowsnow.net/images/"; $dir = "."; opendir(DIR,$dir) || die "Unable to open $urldir: $!"; @files = grep { /\.(?:jpg)$/i } readdir DIR; srand (time ^ $$); $file = rand(@files); open(IMG,$files[$file]) or die "Unable to open $files[$file]: $!"; print "Content-type: image/jpg\n\n"; { print <IMG>; } close IMG; closedir DIR;
In reply to Random Image Generator by invidious
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |