Hi

i am newbie to Perl and need to learn from starting
i have very big file of data (3Gb)like below


00101100
00101101
11H00101
HHHHHHHH
01011001
LLLLLLLL
1011010L
0110111L
00000000
00111111


i need to replace H to 1 in column3 and L to 0 in column 8
only so the file looks like below

00101100
00101101
11100101
HHHHHHHH
01011001
LLLLLLL0
10110100
01101110
00000000
00111111


can it take text file "file1.txt"
and spit out the output in "output.txt"
something like that

i will appreciate any help

Thanks


In reply to Replace bits by newbiecali

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!
  • 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:
    & &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.