)
{
my ($basename) = $filename =~ m{/(.*)\.jpg};
my $captionfile = "captions/" . $basename . ".cap";
my $text = "";
if (-f $captionfile)
{
open(FILE, $captionfile);
my $pos = 0;
my $readlen;
$pos += $readlen while ($readlen = read(FILE, $text, 5000, $pos));
close(FILE);
}
my $imginfo = image_info($filename);
%>
{width} %> height=<%= $imginfo->{height} %> src=thumbnails/<%=$basename%>.jpg border=0>
|
<%= $text %>
|
<%
}
%>