in reply to html tables

print "<input type='image' src='http://typhoon.he.net/~bthcraft/$nme/i +mages/tn_$dat->[$i]->[2]' name='image' height ='$heigh$

This line has a run away string, and also you have variables inside ''.

Same for those lines, you have variables inside '':

print "<input type=hidden name= 'index' value='$i'>"; print "<input type=hidden name='uname' value='$nme'>";

'' prevents variables being resolved to their values. If you want ' be part of your html, escape them like this:

my $a = 2; print "\'$a\'";

This prints '2'