#!/usr/bin/perl use strict; use warnings; use Text::CSV; my $csv = Text::CSV->new; open (CSV, ") { next if (1 .. 2); $_ =~ s/\;/ /g; $_ =~ s/,/\./g; if ($csv->parse($_)) { my @columns = $csv->fields(); print "@columns\n"; } else { my $err = $csv->error_input; print "Failed to parse line: $err"; } } close CSV;