#!/usr/local/bin/perl ############## # 初期設定 # $fives = './five.txt'; # 5文字単語ファイル ################ # メイン処理 # # データ読み込み(5) open(DATAIN, "$fives"); @five = ; close(DATAIN); # 乱数発生&単語確定 $num1 = int(rand(@five)); $word1 = $five[$num1]; chomp($word1); # 文字をバラバラにする $cha = length($word1)/2; for ($i = 0; $i < $cha; $i++){ $char1[$i] = substr($word1,$i*2,2); } # 表示開始 print <<"eof"; Content-type: text/html かきぞめ

かきぞめ

eof foreach $chara (@char1){ print "$chara
\n"; } print <<"eof";

ashに戻る

eof exit;