The # sign, is used for navigation within the page. It is not passed by the browser.
In your example, it is saying, load:
script.pl?first, then look for an anchor called second.
See: w3.org
<a href="#second">second</a>
... very long page ...
<a name="second">Link above should bring the browser here</a>