Re: Text::CSV problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Natxo Asenjo wrote:
Quoted text here. Click to load it

Try this:

use warnings;
use strict;
 my $csv_file = "c:/tmp/dump.csv";
open (CSV, "<", $csv_file) or die "$!\n" ;
while  (my $line = <CSV>)
        chomp $line;             # remove \n
        next unless($line);    # skip blank lines
        my @columns = split(',', $line);
        print join(" ", @columns), "\n";
close CSV;

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail.
Send me your mail from another non-spammer site please.)
Please reply to <petr AT practisoft DOT cz>

Site Timeline