このページに関してのお問い合わせはこちら
【Perl 】初心者コーナーPart5
ツイート
325
:
rubbish_lister
:
2001/06/12(火) 00:00 ID:???
#!/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
326
:
rubbish_lister
:2001/06/12(火) 00:01 ID:???
ぬ、4行目の"my $a ..."は不要ね