#! /usr/bin/perl use strict; use warnings; use CGI; my $lost_file = "/FULL/path/to/lost.txt"; my $cgi = CGI->new; open LOST, '>>', $lostfile or die "open(>>) $lostfile failed: $!\n"; for my $param ( $cgi->param ) { print LOST "$param ", $cgi->param($param), "+"; } print LOST "\n"; print $cgi->header('text/plain'), "job is done.\n";