At the command prompt type: cpan install Text::CSV, then read Text::CSV. Presto, a CSV parser that works well, and that is well understood and supported by the Perl community. :)
And congratulations; you've just installed your first CPAN module. There are some who will tell you that CPAN is the language, and Perl is the syntax that glues it together. That's probably overstating the cause, but I do think it's accurate to say that Perl wouldn't be modern Perl without CPAN.
|