Please provide a complete example. Put your parsing code back with your reading code, because your just creating more places for your program to go wrong. Check the status of your open as I said before. Provide some sample input and put it in a DATA section, like the following (the following is pseudo code, please fill in with actual code):
while (<DATA>) {
#parse data
#open output file
#write data to output file
}
# close output file
__DATA__
#some sample input
Once you turn the above into real code, if you are still having problems with it, then ask again. If you get the above working, then replace a bit at a time (e.g. open your real input source -- maybe it's the problem, and I don't know why you're using sysopen instead of open) until you get your desired result.
-
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.
|