in reply to CGI and Perl script one file, passing arguments

You can debug your new CGI from the command line:

export REQUEST_METHOD=GET export QUERY_STRING=accession=NM_000040 perl -d efetch.cgi

See perldebug for usage of the Perl debugger