Fortunately, the CGI module has a special offline mode for testing your perl CGI scripts before they are installed on the web server. To use the offline mode, simply invoke your CGI program as if it were a normal perl program. The CGI module will recognize that it's not being called by a web server, and will print the following message:
(offline mode: enter name=value pairs on standard input)At this point, you can enter strings like the following:
who = Fred%20Flintstoneto set the values of the form elements to whatever you'd like. Note that the encoding described in Section is required when you use this mode, although if your input contains no blanks or special characters, no special action needs to be done. When you're finished entering the relevant name/value pairs, you can send an end of file signal (control-D on UNIX and control-Z on Windows) to terminate the program, and the output which would otherwise be sent to the web browser will be displayed on your screen.