Thank you for the reply

There is really no way for me to post my entire script as it is too long and on my unix box and it cannot be connected to the internet...

I will post some of the script here that I've been working on

my $count = 0; $array_length = grep m/^.*\n/, @storage; #Storage array contains my fi +le.. Use grep to get the number of sentences for (my $i = 0; $i <= $array_length; $i++) { my $x = 1; if ($storage[$i] eq $storage[$x]) { $count++; } $x++; }

That will return the number of matches of the first 12 sentences in the file... until it hits a line that is not like the first 12...

I do not know how to make it gather a count of all of the lines that are the same and return a count for each of them


In reply to Re^2: Counting the number of times several strings appear by cspctec
in thread Counting the number of times several strings appear by cspctec

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.