Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    use Text::CSV;
    
  2. 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";
    
  3. or download this
    while (<INFILE>) {
    if (/"X"/) {   #The trash data has these 3 characters in it
    ...
      }
    }
    }
    
  4. or download this
    close INFILE;
    close OUTFILE;
    close TRASH;
    
    unlink $trash;