フォームのスタートタグを生成
PerlモジュールのCGI.pmを使用して、フォームのスタートタグを出力しました。
#!/opt/local/bin/perl
use strict;
use warnings;
use CGI qw(:standard :no_xhtml);
print "Content-type: text/plan; charset=utf-8\n\n";
my $cgi = new CGI;
print $cgi -> start_form(
-method => "post",
-action => $cgi -> url,
-enctype => "multipart/form-data"
);
exit;
サンプルコードです。
<form method="post" action="http://localhost/cgi-bin/test.pl" enctype="multipart/form-data">
出力結果です。