in reply to CGI.pm question
#!/usr/bin/perl -wT #set warn and taint flags
use strict; #strict syntax checking
use CGI qw/:standard :html3/;
print "Content-type: text/html\n\n";
etc.
You don't need the ":html3" for this little snippet, but you soon will if you start using the html shortcuts (recommended) and want to do anything more than simple pages. The standard feature set for CGI.pm (loaded by ":standard") only supports HTML 2.0 tags.
With "use strict;", you will need to declare $foo as "my $foo =..."
See the perl documentation for examples of the html shortcuts, which IMO make perl CGI progs which generate HTML far more readable, and also for more info on perl warnings, taint mode, and strict.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: CGI.pm question
by Fastolfe (Vicar) on Apr 14, 2001 at 04:44 UTC | |
by virtualsue (Vicar) on Apr 14, 2001 at 16:38 UTC | |
|
Re: Re: CGI.pm question
by Beatnik (Parson) on Apr 14, 2001 at 15:03 UTC | |
by virtualsue (Vicar) on Apr 14, 2001 at 16:47 UTC |