$daimei
!;
if(open(IFILE,"shohin.csv")) {
while() {
chomp();
@column = split(/,/);
if($ct == 0){
$bk_kbn = substr($column[1], 0, 1);
if($column[4] == 1 && $bk_kbn eq $kbn){
$cnt ++;
$clm_kbn[$cnt] = substr($column[1], 0, 1);
$clm_00[$cnt] = $column[0];
$clm_01[$cnt] = $column[1];
$clm_02[$cnt] = $column[2];
$clm_04[$cnt] = $column[4];
$clm_07[$cnt] = $column[7];
$clm_11[$cnt] = $column[11];
$clm_47[$cnt] = $column[47];
}
}elsif($ct == 1){
$bk_kbn = substr($column[1], 0, 4);
if($column[4] == 1 && $bk_kbn eq $kbn){
$cnt ++;
$clm_kbn[$cnt] = substr($column[1], 0, 1);
$clm_00[$cnt] = $column[0];
$clm_01[$cnt] = $column[1];
$clm_02[$cnt] = $column[2];
$clm_04[$cnt] = $column[4];
$clm_07[$cnt] = $column[7];
$clm_11[$cnt] = $column[11];
$clm_47[$cnt] = $column[47];
}
}else{
if($column[4] == 1 && $column[4] == 1){
$cnt ++;
$clm_kbn[$cnt] = substr($column[1], 0, 1);
$clm_00[$cnt] = $column[0];
$clm_01[$cnt] = $column[1];
$clm_02[$cnt] = $column[2];
$clm_04[$cnt] = $column[4];
$clm_07[$cnt] = $column[7];
$clm_11[$cnt] = $column[11];
$clm_47[$cnt] = $column[47];
}
}
}
close(IFILE);
}
if($cnt > 0){
for ( $i=1; $i<=$cnt; $i++) {
print qq!
!;
}
}
print qq!
$clm_02[$i]
価格: $clm_11[$i]円 (税別) !; if($clm_kbn[$i] eq "E"){ print qq! 産地: $clm_07[$i] !; } print qq! 在庫: |