【Perl 】初心者コーナーPart5

このエントリーをはてなブックマークに追加
325rubbish_lister
#!/usr/bin/perl
use IO::File;
use strict;
my $a = IO::File->new('a.csv');
chomp(my @b = grep{ (split/,/)[3] eq 'ok' } IO::File->new('a.csv')->getlines);
IO::File->new('>b.csv')->print( map{ join("\t", (split/,/)[2, 5]) . "\n" }@b );
__END__
>>324