in reply to Re: Converting File Delimiters
in thread Converting File Delimiters
I used your example and added file references but the script is not outputting all of the rows.
#!/usr/bin/env perl use strict; use warnings; use Text::CSV; my $FileIn = 'aaa.csv'; my $FileOut = 'Converted.txt'; my $csv = Text::CSV::->new() or die Text::CSV::->error_diag(); #open my $FH, "<", "aaa.csv"; open my $FH, "<", $FileIn; open (OUTFILE, "+>$FileOut"); while (my $row = $csv->getline($FH)) { print OUTFILE join('|' => @$row), "\n"; };
Not sure what I'm doing wrong?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Converting File Delimiters
by kcott (Archbishop) on Aug 10, 2012 at 06:22 UTC | |
by mmueller44 (Novice) on Aug 14, 2012 at 01:31 UTC | |
by BrowserUk (Patriarch) on Aug 14, 2012 at 02:43 UTC | |
by mmueller44 (Novice) on Aug 16, 2012 at 18:07 UTC |