in reply to cookie retrieval

If you are 'use CGI; my $cgi = CGI->new'ing, you can do this instead:
my $cookie_a = $cgi->cookie('a');