in reply to Making CSV Files from Tab Delimited Files
It looks like $file = '"'.$file; would be really slow because you are copying the entire file.
Anyway, it looks like you only need one regular expression (and transliteration):
my $file = <$INPUT>; $file =~ s/(?:(?<=^)|(?<=\t))([^\t\n]*)(?=[\t\n])/"$1"/mg; $file =~ tr/\t/,/;
|
|---|