You missed the point. What is the fastest way to
test 100's of regex expressions against every
line in a file? Here is what I've come up with:
# map REGEXs over line
72.328 user, 0.108 sys, 1:24.18 real, 86.0% cpu
0k text, 0k data+stack, 0k avg, 0k max
36 in, 3 out, 0 faults, 325 reclaims, 0 swaps
# eval preformed REGEXs over line
196.128 user, 0.093 sys, 3:47.98 real, 86.0% cpu
0k text, 0k data+stack, 0k avg, 0k max
43 in, 3 out, 0 faults, 358 reclaims, 0 swaps
# eval over preconstructed function
1.742 user, 0.030 sys, 0:02.00 real, 88.5% cpu
0k text, 0k data+stack, 0k avg, 0k max
19 in, 1 out, 0 faults, 329 reclaims, 0 swaps
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.