How can you expect us to help you with code you didn't show?

The specification: You would like to search a bunch of really big files and print lines that match triggers.

Qualifying the solution: You need speed, and don't want to use system grep.

What you've tried so far: ????????????????

How ???????????? failed: It was too slow.

What you tried instead: system call to grep

How that failed: You don't want to use a system call.

What you need: Help with ???????????????? so that it can be faster.

What we can do for you: Look at ????????????????? and offer suggestions on how ?????????????? might be improved upon so that it's faster.

Where we must start: ?????????????????????

Does this make sense? You are seeking help with a solution that you came up with that was too slow. But instead of showing us that solution, you provided us with an alternative that you don't want to use because it requires a system call. We could come up with a lot of ideas on how to do what you're asking for, but how do we know if our solution is any better than the one you tried but didn't show us? I'm not going to spend time working up a solution only to have you tell me that you already tried that.


Dave


In reply to Re: grep equivalent in perl by davido
in thread grep equivalent in perl by shynee

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.