Because of a small error: one comma too many :)
while (<$csv_file>) { s/\Q$sep\E/\t/g; print $tab_file, $_; # ^- That comma should not be there }
Other than that, I still think you ought to look into the proposed Text::CSV_XS or Text::CSV solutions.
In reply to Re^3: Convert CSV file to TAB delimited
by Tux
in thread Convert CSV file to TAB delimited
by TCM
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |