It's not clear what you want to get as a result from your script. When you say:
… i need to use the current date search each column to get the number of occurrence from each columns
I'm afraid that doesn't make any sense in English. Perhaps you can give an example of data that should produce a particular output, and tell us what that particular output should be.
I notice that sample data you gave uses semi-colons between the fields (;), but you are using a comma in your split call (,), so @fields would always have a single element containing the whole line (because there are no commas), and $fields[2] will always be undef.
Anyway, assuming that you do the split the right way, what do you really want to do with the second date string of each line?
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.