Good evening, Monks! Obviously there's no shortage of modules out there to deal with CSV files -I'd be crazy to suggest otherwise. So that leaves it to either my inexperience with the language or the lack of relavent examples leaving me rather high and dry. I found a few modules on CPAN that I'd like to try, but pretty much all I can see is examples of how to fill an array and pump it into a new CSV. Not much on searching and modifying existing data. See, I have a memberlist that I need to search to see if members exist. If they do, I need to increment a counter for that user. If not, I need to add them and start a new counter. Here's an example of the format:
Username,Email,Counter,JoinDate
Now again, being new, I'm learning by example here. Can anyone point me in the right direction and give a good firm kick? Class::CSV looked as though it had promise, as did Text::CSV_XS. I was even looking at DBD::RAM for a while, but I've come to the conclusion that it's not available for my current build of ActivePerl. Since the file is only about 3500 rows by 7 or so columns, I don't think reading it into RAM is a problem. Then again, it's not entirely necessary either. While I don't want this to take years to get through, I don't need to set any speed records either. Reading and writing the existing file should suffice.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.