CGI scripting Error

I am trying to execute following program

#!/usr/bin/perl -wT
use CGI qw(:standard);
print start_html("Hello world");

and getting an error (offline mode: enter name=value pairs on standard input)

i am a beginner so please try to explain it as much as possible.

---------- Post updated at 09:53 AM ---------- Previous update was at 08:40 AM ----------

i have tried to check syntax by running command,
perl -cwT fourth.cgi :confused:
and it says syntax is ok.

What is the output of the script when you run it at the command line?

The equivalent shell script CGI is:

printf "Content-type: text/html\n\n"

printf "%s\n" "Hello, World!"

Hi Johnson, thanks for your reply.
i am trying to run this CGI script on command line only i am not using any web server to check this script.
I would appreciate if you can help me further in this case.:wink:

This isn't an error. Perls CGI module handles the conversion of form parameters, passed via the GET or POST method. Since you're calling it "offline" (not via the web browser), it has to obtain these parameters some other way (even if the script doesn't require them), so it asks for you to input them. If you don't have any parameters to pass, just press Control+D (EOF).

Hi pludi, thanks for your quick reply, it worked.:slight_smile:
but i am curious to know what all parameteres are sent through GET or POST, if you can help me with that.
Thanks in advance.