The solution is that you debug your program using the advice and links already provided in reply to your several posts. If you're unable or unwilling to do so consider speaking to your manager or team leader explaining the situation. Consider the code you've actually written, what it does and what you're attempting to do. Your "expected output" does not occur within your program. http://learn.perl.org, tutorials.
in reply to Re^2: Help required for CGI Script
in thread CGI Script Working fine from my command prompt but Shows Internal server error when called through browser