Your post isn't very clear, you should write a small example so that we can better understand what data you are processing. See How do I post a question effectively?. And you should give more information about the sizes and complexity you have to deal with (how big is the big file, and how many smaller files do you process?)

The first thing you need to do is identify which part (or parts) is taking so long. Since you are talking about minutes , you can make a pretty rough measure (in seconds) with code like:

my $start_time = time; # Big step here print "First step ended at time: ", $start_time - time; # Other big step print "Second step ended at time: ", $start_time - time;
Try to find out exactly which part is taking most of the time, and then we can focus on that :).

Edit s/you're/your/ :D


In reply to Re: Best way to search large files in Perl by Eily
in thread Best way to search large files in Perl by ccmadd

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.