in reply to close end tag

if( closing tag is mising ){
  print closingtag
}
so i think
print '</a>' if -1 == index lc $_, '</a>';