#!/usr/bin/perl
use IO::File;
use strict;
my %exists;
IO::File->new('>b.csv')->print(
map{ sprintf("%s\t%s\n", @{ $_ }[3, 6]) }
grep{ $_->[4] eq 'ok' and not $exists{ $_->[6] }++ }
map{ chomp; [ undef, split /,/ ] }
IO::File->new('a.csv')->getlines
);
__END__
>>335 あまり大きなファイルを処理するのには向かないが