in reply to html input value

Have a look at Re: need some HTTP::Server::Simple::CGI example, especially the line my $who = $cgi->param('name');. I'm not clear about your precise problem, so I may be way off track when saying that you will need a server and a client for this and that the snippet you show seems to be trying to combine the two.

Regards,

John Davies

Replies are listed 'Best First'.
Re^2: html input value
by bgblue (Initiate) on Oct 09, 2018 at 10:30 UTC

    i dont think my question is confusing. its simple and clear. how can you pass values from html its like how do u parse values from html source and read them in cgi script

      See CGI 101 which has simple examples. Your original code prints output before header which is no doubt going to cause you problems.

      Your question could be seen to require clarification because the example you posted will just manually print a header (since you use CGI you can use it to print the header for you) and display an text input with a predefined value. You have no <form> element, and no way of submitting the input to your script. You seem to be missing the very basics of how all this hangs together. https://developer.mozilla.org/en-US/docs/Web as well as the CGI documentation (note the clear warnings at the start), Tutorials -> Web Programming I know what I mean. Why don't you?.

        yes i know. my html has no form. i just want to get value when the page loads