#d:/web/scripts/perl/bin/ # # program name : counterpro.pl # # programmer : K.M # #(1)ファイルの設定 # $count_file = "g:/kyurin/count.txt"; #カウント数格納ファイル # #(2)ダミーファイルを送る(実際は画面上には表示されない) # print "Content-type: text/html\n\n"; print "This file is dummy\n"; # #(3)カウントアップ # open(COUNT_FILE, "+< $count_file"); flock(COUNT_FILE, 2); $count = ; $count++; seek(COUNT_FILE, 0, 0); print COUNT_FILE $count; flock(COUNT_FILE, 8); close(COUNT_FILE);