in reply to novie perl-CGI user

novitiate, all I can think of saying is, there are some small infelicities in your function that are probably not related to the problem you are having.

I regret that there isn't more here that's helpful to your specific problem; I wasn't able to reproduce your errors, and lacking your netsession.cgi probably can't. But, hopefully, there might be something useful in what I did think of saying.