Posted on 2007-06-01 19:59:53-07 by dday in response to 3636
Re: Having Problem with Text-CSV-Simple
Hey, Samn-

Looks like you didn't set a value for your CSV data file variable, "$datafile". You need to specify a file for that variable. Then, it should work like a charm.

use Text::CSV::Simple;
my $parser = Text::CSV::Simple->new;
my $datafile = "SamnsCSVFile.csv";
my @data = $parser->read_file($datafile);
print @$_ foreach @data;

Enjoy,
D-Day

Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.