1 #!/usr/local/bin/perl
@ @
2 #ƒJƒEƒ“ƒg—pƒtƒ@ƒCƒ‹‚Ì‘I‘ð
3 $datafile="count.txt";
@ @
4 #ƒJƒEƒ“ƒg‚̓ǂݍž‚Ý
5 open ( DATA, "$datafile");
6 $number = <DATA>;
7 close ( DATA );
@ @
8 #ƒJƒEƒ“ƒgƒAƒbƒv
9 $number = $number+1;
@ @
10 #ƒJƒEƒ“ƒg‚̏‘‚«ž‚Ý
11 open ( DATA, "> $datafile");
12 print DATA $number;
13 close ( DATA );
@ @
14 #”Žš‚Ì•ªŠ„
15 @counter = split (//,$number);
@ @
16 #æ“ª‚É0‚ð‚‚¯‚é
17 while ( $#counter+1<6 ){
18 @counter = ( 0,@counter );}
@ @
19 #•\Ž¦
20 print "Content-type: text/html¥n¥n";
21 foreach $key ( @counter ){
22 print "<img src=¥"images/$key.gif¥">";}