If your data is in a CSV file then you will be much better off extracting the data using a dedicated CSV module. For example, Text::CSV_XS by Tux is highly recommended. You should extract the relevant field(s) first, and only then apply one or more regexes to those fields to extract the data you want.
We’re going to need more information before we can give further help. The best way to provide us with that information is to follow the advice in How do I post a question effectively? —
Include (inside <code>...</code> or <c>...</c> tags) a minimal script that reproduces your problem and sample data (input).
— together with the output you actually get and the output you want.
P.S. It’s chomp that’s in the wrong part of the loop, not $count.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re^3: Regex problem i think?
by Athanasius
in thread Regex problem i think?
by StalkinYerMa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |