hii all
i have a file a which contains some thing like this
0 yyx 3020
1 yyw 10,000
now i have another file (file2) which contains the characters say abceffredd.... starting from 1 to n positions i want to refer first file if 0 appears it should go to eg 3020 position in file 2 and see for a pattern match say $abc at 250 characters after 3020 (i,e., 3270). if 1 appears it shud go 250 characters before 3020 and search for the pattern $abc. what should be done for it. i think use of substring
$pos1=$pos-250; $seq250 = substr($sequence,$pos1,250);
would help me but not really able to derive it

In reply to matchin a pattern 250 characters up and down stream by Anonymous Monk

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.