use CGI; my $q = CGI->new; open my $fh, '>>', '/path/to/requests.log' or die $!; $q->save($fh); close $fh or die $!;