in reply to Random Image Displayer
minor blasphemy :
Here I'd recommend learning a little PHP; it will be easier from a maintainability perspective than writing a utility in another language. PHP does not support SSI, but that's not a problem because its capacities exceed those of SSI by a big margin. PHP can output HTML, and that includes dynamically generating <img> tags. It can read directories, and filter on extension, and select a random one from among the list of matching files.
Why bother spawning a whole new process when you have the capability already built in? The relevant functions in PHP are quite similar to the ones in Perl. Read up on readdir in PHP, learn how to use ereg_match, and you'll be able to write the image randomizer easily.
perl -e 'print "How sweet does a rose smell? "; chomp ($n = <STDIN>); +$rose = "smells sweet to degree $n"; *other_name = *rose; print "$oth +er_name\n"'
|
|---|