Can't modify constant item in scalar assignment
The code?
sessionname="A";
What did the apache error log say?
[error] [client 127.0.0.1] Can't modify constant item in scalar assignment at C:/Programme/Apache Group/Apache2/cgi-bin/reporting/session.cgi line 7, near ");"\r
This Perl error is one of the most occuring ones when debugging a Perl script. Especially when you are also used to work with a language which supports declaring variables without a leading dollar, the source of this problem might not even be obvious to you.
Add a dollar sign before your scalar variables in Perl!