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

... fails to pass the value of $access to $query
How are you coming to that conclusion ?

Have you tried running this cgi script from the command-line under the perl debugger ?

(set) QUERY_STRING=accession=your-number perl -d efetch-cgi.pl
BTW - using the CGI module would simplify your life considerably.

        "You're only given one little spark of madness. You mustn't lose it."         - Robin Williams