..so if I read this right, you are not interested in lines that begin with h(lower case). You are only interested in outputting lines that start with j, E, or G. If that is in fact the case, then the problem should be pretty simple. Read the file into an array, loop through the array line by line using a regex to check for lines beginning with j, E or G and print them out. I get the impression I am missing something here... What importance do the lines beginning with h(lower case) have to you?
- ...the majority is always wrong, and always the last to know about it...
- The Spice must flow...
- ..by my will, and by will alone.. I set my mind in motion
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|