Perl 関連情報
 Perl, PHP, CGI, etc マニュアル
 Perl, PHP, CGI, etc マニュアル 
   Perl4 文法 http://www2n.biglobe.ne.jp/~kajino/perl4ref/frame.html
 Perl4 文法 http://www2n.biglobe.ne.jp/~kajino/perl4ref/frame.html
   Perl4 FAQ http://www.harukaze.net/mishima/perl/faq/faq0j.html
 Perl4 FAQ http://www.harukaze.net/mishima/perl/faq/faq0j.html
   Perl5 マニュアル翻訳 http://www.kt.rim.or.jp/~kbk/perl5.005/
 Perl5 マニュアル翻訳 http://www.kt.rim.or.jp/~kbk/perl5.005/
   とほほのperl入門 文法 http://www.tohoho-web.com/wwwperl.htm Local
 とほほのperl入門 文法 http://www.tohoho-web.com/wwwperl.htm Local
     文法リファレンス http://www.tohoho-web.com/wwwperl2.htm
   Perl 基礎入門 文法: www.kent-web.com/index.html Local
 Perl 基礎入門 文法: www.kent-web.com/index.html Local
   Perlでnet::ftp http://perldoc.jp/docs/modules/libnet-1.12/Net/FTP.pod  cache
 Perlでnet::ftp http://perldoc.jp/docs/modules/libnet-1.12/Net/FTP.pod  cache
   CGI Documentation http://hoohoo.ncsa.uiuc.edu/cgi/index.html
 CGI Documentation http://hoohoo.ncsa.uiuc.edu/cgi/index.html
   ネットプログラミングの基礎知識 http://x68000.q-e-d.net/~68user/ (Local)
 ネットプログラミングの基礎知識 http://x68000.q-e-d.net/~68user/ (Local)
    HTTP, FTP, POP3 client, ECHO server programの作り方。わかりやすい。
   Perl プログラミング講座 http://www.site-cooler.com/kwl/perl/
 Perl プログラミング講座 http://www.site-cooler.com/kwl/perl/ 
    Perl文法の他に、CGI, SMTP プログラミングの実例あり。
   Perl でFTP http://ash.jp/perl/socket_ftp.htm
 Perl でFTP http://ash.jp/perl/socket_ftp.htm
   Ash multimedia lab http://ash.jp/
 Ash multimedia lab http://ash.jp/
   Perlでブラウズ(HTTP) http://ash.jp/perl/socket_http.htm
 Perlでブラウズ(HTTP) http://ash.jp/perl/socket_http.htm
   PerlによるCGIスクリプト制作メモ http://tech.bayashi.net/pdmemo/
 PerlによるCGIスクリプト制作メモ http://tech.bayashi.net/pdmemo/
    メール、MySQL, SEOなど。useとrequireの違い。
   Perlオブジェクト指向プログラミング http://www.pure.ne.jp/~learner/program/Perl_oo.html
 Perlオブジェクト指向プログラミング http://www.pure.ne.jp/~learner/program/Perl_oo.html
   Perlで作るCGI講座 - CGI.pm を使ってみよう http://www.futomi.com/lecture/form/cgi-pm.html
 Perlで作るCGI講座 - CGI.pm を使ってみよう http://www.futomi.com/lecture/form/cgi-pm.html
   >IT技術情報>プログラミング一般>Perl第3回:Perl応用>第3回:Perl応用:
 >IT技術情報>プログラミング一般>Perl第3回:Perl応用>第3回:Perl応用:
     1. PerlをCGIで利用する http://www.stackasterisk.jp/tech/program/perl03_01.jsp
       フォーム入力とCGI.pmサンプル
     2. Perlからデータベース(DataBase)に接続する http://www.stackasterisk.jp/tech/program/perl03_02.jsp
     3. Perlからメール(Mail)を送信する http://www.stackasterisk.jp/tech/program/perl03_03.jsp
       mimew.pl 使い方実例
       require "mimew.pl"; $subject = mimeencode( jcode'jis($subject)
);
   Perlで作るCGI講座 - CGI.pm を使ってみよう http://www.futomi.com/lecture/form/index.html
Perlで作るCGI講座 - CGI.pm を使ってみよう http://www.futomi.com/lecture/form/index.html
   Perlで作るCGI講座 - cgi-lib.pl を使ってみよう http://www.futomi.com/lecture/form/cgilib.html
Perlで作るCGI講座 - cgi-lib.pl を使ってみよう http://www.futomi.com/lecture/form/cgilib.html
   Perl-lib 解説 http://www.tryhp.net/perllib.htm 暗号化など詳しい。Local
Perl-lib 解説 http://www.tryhp.net/perllib.htm 暗号化など詳しい。Local
   Cephed http://www.ss.iij4u.or.jp/~somali/index.shtml Local
Cephed http://www.ss.iij4u.or.jp/~somali/index.shtml Local
     Perl CGI/暗号化技術
■Perl 5.8で日本語を使う:
http://homepage2.nifty.com/ttoyoshima/Perl/Perl.htm
http://www.din.or.jp/~ohzaki/perl.htm
use encoding "cp932";
$/ = "\r\n";
Perl のプログラムを「シフトJIS」で書き、プログラムの先頭に上記2行を記述。
1行目で Perl は「シフトJIS」コードの全ての日本語を
「Unicode」に変換して読み込んでくれるので、文字化けは生じなくなる。
第2行目はキーボードやファイルの改行が Windows
標準の「CR+LF」であることを指定している。
■ファイルハンドルを引数で渡すには →fh.txt 
■バイナリーファイルを受信するには →binaryfile.htm →binaryfile.txt
 Winでは binmodeにする。
 ファイル終端のチェックには、ヘッダーにに、下記のテキストが返される。
GET xxx.gif
に対して、
HTTP/1.1 200 OK
Proxy-Connection: Keep-Alive
Connection: Keep-Alive
Date: Mon, 09 Jun 2008 01:24:38 GMT
Server: Apache
Last-Modified: Mon, 09 Jun 2008 01:22:52
GMT
ETag: "95c083-18fe2-a67c5300"
Accept-Ranges: bytes
Content-Length: 102370
Content-Type: image/gif
Age: 105
この、Content-Length: を使う。
■PerlでNull変数/未定義変数の場合初期化するには
文字としての 0 とする場合
$value = '0' unless $value;
数値としての 0 とする場合
$value += 0 unless $value;
■■■ HTTPプロトコル ■■■
■クライアントからの送信文字列:(自動ダウンロードを作るときに必要)
通常:
	GET 絶対パス HTTP/1.0
	HOST: www.kkch.net:80	マルチドメインの時に必要
フォーム入力(GET)
	GET /cgi-bin/a.cgi?hoge=fuga&hoge2=fuga2&.. HTTP/1.0
フォーム入力(POST)
	POST /cgi-bin/a.cgi HTTP:1.0
	Content-Length: 渡す文字列長
	hoge=fuga&hoge2=fuga2& ..
Basic認証
	GET 絶対パス HTTP/1.0
	HOST: www.kkch.net:80
	Authorization: Basic `base64 "ユーザーID:パスワード"`
■ 仮想ホスト
HTTP/1.1 では仮想ホストがサポートされました。
HTTP/1.1 のクライアントは Host ヘッダでホスト名を送信しなくてはなりません。
サーバーは、仮想ホストに対応したコンテンツを応答します。これにより、1台のサーバーで複数のWebサイトをサポートすることが可能になりました。
GET / HTTP/1.1
Host: www.tohoho-web.com
■サーバーからの返信文字列 (CGIを作るときに必要になる情報)
	Content-type: text/html
	HTTP/1.1 401 Authorization Required		リターンコード401
	WWW-Authenticate: Basic realm="Secret File"		認証を要することを示す
■フォーム入力のhtmlファイル
<FORM method="post" action="CGIプログラム">
<input type=hidden name="変数名" value="デフォルト">定数
<input type=text name="変数名" value="デフォルト">テキストボックス
<input type=radio name="変数名" value="デフォルト">ラジオボタン。同名の変数の択一
<input type=checkbox name="変数名" value="デフォルト">チェックボックス
<textarea name="変数名" RAWS="5" COLS="70"
value="デフォルト"></TEXTAREA>
<input type="submit" VALUE="ボタン表示文字列">
実行ボタン
<input type="reset" VALUE="ボタン表示文字列">
リセット
</form>