Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
<MYFILE> has columns similar to this. I want to save column # and last column value when I open this file.I tried to save in sub-strings
IN CHAIN A RESIDUE 1 HAS ENERGY 28.8216 IN CHAIN A RESIDUE 2 HAS ENERGY 24.9274 IN CHAIN A RESIDUE 3 HAS ENERGY 19.0884 IN CHAIN A RESIDUE 4 HAS ENERGY -27.6978 IN CHAIN A RESIDUE 5 HAS ENERGY 34.8558 IN CHAIN A RESIDUE 6 HAS ENERGY 17.9725 IN CHAIN A RESIDUE 7 HAS ENERGY 29.0379 IN CHAIN A RESIDUE 8 HAS ENERGY 13.7192 IN CHAIN A RESIDUE 9 HAS ENERGY 15.3481 IN CHAIN A RESIDUE 10 HAS ENERGY -7.55393 IN CHAIN A RESIDUE 11 HAS ENERGY -5.87837 IN CHAIN A RESIDUE 12 HAS ENERGY 40.7543 IN CHAIN A RESIDUE 13 HAS ENERGY -11.5488 IN CHAIN A RESIDUE 14 HAS ENERGY -11.7673 <NEWF> has columns similar to this. I want to save column # and compar +e it with previous MYFILE vale. When they match I want to print the valve that I stored in previous fi +le in place of last but one column (bold column) ATOM 1 N MET 1 4.440 25.987 -14.585 1.00 0.00 + A ATOM 2 HT1 MET 1 4.524 25.860 -15.614 1.00 0.00 + A ATOM 3 HT2 MET 1 4.109 26.952 -14.383 1.00 0.00 + A ATOM 4 HT3 MET 1 3.729 25.316 -14.228 1.00 0.00 + A ATOM 5 CA MET 1 5.708 25.747 -13.831 1.00 0.00 + A ATOM 6 HA MET 1 6.008 24.725 -14.011 1.00 0.00 + A ATOM 7 CB MET 1 6.792 26.728 -14.367 1.00 0.00 + A ATOM 8 HB1 MET 1 6.812 26.659 -15.475 1.00 0.00 + A ATOM 9 HB2 MET 1 6.502 27.769 -14.109 1.00 0.00 + A ATOM 10 CG MET 1 8.241 26.517 -13.880 1.00 0.00 + A ATOM 11 HG1 MET 1 8.298 26.709 -12.787 1.00 0.00 + A ATOM 12 HG2 MET 1 8.547 25.462 -14.049 1.00 0.00 + A ATOM 20 N ALA 2 6.330 25.384 -11.469 1.00 0.00 + A ATOM 21 HN ALA 2 7.105 24.825 -11.751 1.00 0.00 + A ATOM 22 CA ALA 2 6.383 25.717 -10.067 1.00 0.00 + A ATOM 23 HA ALA 2 6.344 26.791 -9.955 1.00 0.00 + A ATOM 24 CB ALA 2 5.300 25.034 -9.205 1.00 0.00 + A ATOM 25 HB1 ALA 2 4.288 25.319 -9.565 1.00 0.00 + A ATOM 26 HB2 ALA 2 5.394 23.928 -9.255 1.00 0.00 + A ATOM 27 HB3 ALA 2 5.396 25.346 -8.143 1.00 0.00 + A ATOM 28 C ALA 2 7.753 25.238 -9.659 1.00 0.00 + A ATOM 29 O ALA 2 8.299 24.357 -10.317 1.00 0.00 + A ATOM 30 N THR 3 8.353 25.813 -8.605 1.00 86.23 + A ATOM 31 HN THR 3 7.908 26.533 -8.079 1.00 0.00 + A ATOM 32 CA THR 3 9.687 25.408 -8.176 1.00 88.87 + A ATOM 33 HA THR 3 9.829 24.356 -8.373 1.00 0.00 + A ATOM 34 CB THR 3 10.847 26.194 -8.810 1.00 91.62 + A ATOM 35 HB THR 3 11.790 25.982 -8.261 1.00 0.00 + A

In reply to Re^2: incrementing already existing file by wanttoprogram
in thread incrementing already existing file by wanttoprogram

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others rifling through the Monastery: (5)
    As of 2014-08-01 06:12 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (257 votes), past polls