in reply to Re^2: Regex problem i think?
in thread Regex problem i think?

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,

Replies are listed 'Best First'.
Re^4: Regex problem i think?
by StalkinYerMa (Initiate) on Sep 10, 2014 at 19:18 UTC

    I want to say sorry to make you guys look at this, i learned alot, It wasent working because my teacher wanted to play a sick prank and give me a file that had no matches in it. Thank you for the advise, the code worked fine!

      So make up your own test set and check the code that way!

      Your teacher is probably kinder than the world in general. Learning to check your assumptions and your work are a vital component of programming.

      Perl is the programming world's equivalent of English