use Text::CSV;
my $csv = Text::CSV->new();
while (my $line = <>) {
  if ($csv->parse($line)) {
    my @columns = $csv->fields();
    ## ほげほげ
  }
  else {
    my $err = $csv->error_input;
    warn "csv parse() failed on argment: $err\n";
  }
  }