7 binmode STDOUT, ":utf8";
12 my $data = $form->param('partsdata');
14 @buffer = split(/\r\n|\r|\n/, $data);
22 foreach $temp (@buffer){
23 if($temp =~ m/:/ && $temp =~ m/[0-9]/){
24 @temp = split(/ |\t|\r\n|\r|\n/, $temp);
29 foreach $temp (@buffer){
30 if($temp =~ m/:/ && $temp =~ m/[0-9]/){
33 @temp = split(/ |\t|\r\n|\r|\n/, $temp);
34 @temp2 = split(/\$/, $temp[1]);
35 foreach $temp2 (@temp2){
36 if($temp2 =~ m/^1:(0|2):(0|2):/){ $check++; }
37 if($temp2 =~ m/^1:(0|12|22|32):(0|13|23|32|4):/){ $check++; }
38 if($temp2 =~ m/^2:(0|12|22|32):(4|5|7):/){ $check++; }
39 if($temp2 =~ m/^2:7:(0|4|8):/){ $check++; }
40 if($temp2 =~ m/^2:2:7:/){ $check++; }
41 if($temp2 =~ m/^3:(0|12|22|32):(0|5):/){ $check++; }
42 if($temp2 =~ m/^6:22:5:/){ $check++; }
43 if($temp2 =~ m/^7:(0|12|22|32):7:/){ $check++; }
44 if($temp2 =~ m/^99:[^:]+:[^:]+:[^:]+:[^:]+:[^:]+:[^:]+:([^:]+)/){
46 if(!exists($parts{$1})){
47 $error = $error | $ERROR_NOPARTS;
50 if($temp2 =~ m/^0:/){ $check++; }
53 $error = $error | $ERROR_SYNTAX;
56 if($error & $ERROR_SYNTAX){
57 $result .= "** 文法エラー・処理できない筆画があります **\n";
59 if($error & $ERROR_NOPARTS){
60 $result .= "** 99番で使用されている部品が存在しません **\n";
62 $result .= "$pre2\n$pre1\n==> $temp\n"."-" x 70 . "\n";
70 $result = "エラーはありませんでした\n";
74 Content-type: text/html;
77 PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
78 "http://www.w3.org/TR/html4/loose.dtd">
79 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
80 <link rel="stylesheet" type="text/css" href="http://fonts.jp/green.css">
88 <p>チェック結果は以下の通りです。</p>
92 <p><a href="checkdata.html">戻る</a></p>