I have a file that has a values like this:
date, val1, val2, val3, val4 etc
1/2/2007, 1, 4, 5, 6
1/3/2007, 2, 5, 7, 10
1/5/2007, 5, 6, 8, 11
I need to subtrack the symetric cells and write the output to a file. For example, I need to write the first row as it is to the new file since it is the first row. Then write 2-1, 5-4, 7-5, 10-6 and 5-2, 6-5, 8-7, 11-10 and etc.
since I am new to perl, can you please help me do this in perl.
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>
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
Want more info? How to link or
or How to display code and escape characters
are good places to start.