in reply to ideas on how to improve existing code

If csv is simple enough and you know it is provided by a tool which provides csv files correctly, I don't see why using Text::Csv Maybe a simple sustitution work ?
open (CSV, "<File_name.csv") or die $!; while (<CSV>) { next if (1 .. 2); $_ =~ s/\;/ /g; $_ =~ s/(\d),(\d)/\1\.\2/g; print; }

Replies are listed 'Best First'.
Re^2: ideas on how to improve existing code
by dsheroh (Monsignor) on Aug 30, 2011 at 09:20 UTC
    Note that this breaks on any CSV data which allows quoted strings with embedded commas.
    this,line,has,6,"fields, not",7
    Just use Text::Csv and you don't have to worry about things like that.