Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] utf form problems



On 27/02/2008, steven smith <sjs@example.com> wrote:
>  >
>  > You're reading stdin directly!?  Don't do that.
>
> ?? what else would one do?

Try something like:

#!/usr/bin/perl
use utf8;
use CGI ':standard';
print header(-type => "text/html", -charset => "UTF-8");
print start_html("Simple form test"), h1("Hello");
if (my $input = param("stuff")) {
    print p("You entered: $input");
}
print start_form, "Type some stuff here: ", textfield("stuff"), end_form;
print end_html;


There are many other ways to do the same thing, but that example
should be a good enough starting point for you, and it will be well
documented in the CGI module.

-- 
Marty


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links