- or download this
#!/usr/bin/perl
use strict;
use Text::CSV;
- or download this
my $input="input.csv";
my $output="output.txt";
...
open(INFILE,$input) || die "Can't open file $input";
open(OUTFILE,">$output") || die "Can't open file $output";
open(TRASH,">$trash") || die "Can't open file $trash";
- or download this
while (<INFILE>) {
if (/"X"/) { #The trash data has these 3 characters in it
...
}
}
}
- or download this
close INFILE;
close OUTFILE;
close TRASH;
unlink $trash;