good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Reading, filtering one collumns' data, writingby Marshall (Canon) |
on Nov 23, 2022 at 18:00 UTC ( [id://11148334]=note: print w/replies, xml ) | Need Help?? |
It looks like there was a failed attempt to establish a session with a mysql server? Then I guess you got a CSV file with the data you wanted?
Some recommendations:
Update: See DBD::CSV for some examples of how to open and use your CSV file like a DB.
This will throw away half the lines ... the while statement reads a line into $_. The split reads another line. This is closer to what you want, but inferior to using Text::CSV. If your CSV has a field with an embedded comma: "343 Anywhere, Apt 12", then split on comma will see that internal comma and you get an "extra" token. Text::CSV will leave that embedded comma "as is".
In Section
Seekers of Perl Wisdom
|
|