the most important part of the question (that relates to variable type in perl) is "...associated problem is ensuring that jump destinations or anchors are unique..." There's only one variable type that guarantees non-repeated html targets ---->>>> hash....i.e. html targets become hash keys. you do the rest of your homework...not going to give you code....learn something, by doing it.