2
Perl 라이브러리 Text :: CSV_XS를 사용할 때 내 CSV 파일의 헤더를 무시하고 싶습니다. Perl : Text :: CSV_XS가 포함 된 헤더 무시
는 것보다 이렇게하는 더 이상 적절한 방법이 다음 이use Text::CSV_XS;
open(my $fh, "<", "file.csv") or die "file.csv: $!";
my $csv = Text::CSV_XS->new();
#ignore header
my $row = $csv->getline($fh);
while ($row = $csv->getline($fh)) {
#do stuff with the rows...
}
또는 :'$ csv-> column_names ($ csv-> getline ($ fh));' – ikegami