1 #!/usr/local/bin/perl -w
6 # Directory to find images in
7 my($dir) = "/web/i-scream/htdocs/logos";
8 # Pattern to match images - remember to escape
9 my($pattern) = "\\.jpg\$";
11 # URL to images - must match $dir
12 my($url) = "http://www.i-scream.org/logos";
14 # Where the setbg command is
15 my($setbg) = "/web/i-scream/bin/setbg.pl";
18 my($imagepath) = `$setbg -r -p \'$pattern\' -b echo -f \' \' $dir`;
20 $imagepath =~ s/$dir/$url/;
22 print "Content-type: text/plain\n\n";