here is an example of what i would like to do; i hope it is clear:
let's say i have a file 'cat.jpg'; when you click the link, a new page opens up with the image and a caption 'this is a cat'. the same script would also open up 'dog.jpg' with the caption 'this is a dog'. i have many images that i would like to display, but i don't want to build a page for each one. i found a script that opens up all the images in a formatted page, but i don't know how to add the captions. is this a job for perl? thanks in advance.
Welcome to WebmasterWorld :)
You can generate the html pages with a relatively simple perl script.
do something like:
ls > imageList.txt
then in a perl script.
while(<>)
{
chomp;
&writeTemplate($_);
}
In your writeTemplate sub you will need to write out to a file probably using the image name. Then 'here' document quoting to make it easy to create the file.
example:
print FILE <<EOF;
<html>
<head>
</head>
<body>
<img src="$_">
<p> $caption </p>
</body>
</html>
EOF
You will need to pull in and connect the caption to the image name somehow but that shouldn't be too difficult.