in reply to <a href> tag and subroutines

It sounds like you have a CGI script and you want to have it generate a link such that, when a user clicks on that link, a specific subroutine in your CGI gets called.

I guess the answer is a little bit "yes" and little bit "no". The biggest reason it is "no" is because each click from the user will rerun your CGI script from the beginning in a different process.

But you can make a link that will call your same CGI script with enough information for it to reconstruct the needed context and then call a subroutine. There are lots of ways of doing that and the details of that part (having the link specify the subroutine) are tiny compared to the part you didn't ask about (getting the new instance of your CGI script to reconstruct the needed context), so I think going into more details on the former would mostly be confusing, unfortunately.

If this is what you are talking about, then you should probably find a good tutorial on CGI and Perl and maybe eventually check out something like CGI::Application.

                - tye