yeah, i tried with use warnings and use strict, here is the program which i tried.
#!/usr/bin/perl use strict; use warnings; open(FH1,"read.txt"); open(FH2,"qual.txt"); my @arr1=<FH1>; my @arr2=<FH2>; my $joi1=join(' ',@arr1); my $joi2=join(' ',@arr2); my @new=split('>',$joi1); my @numbers=split('>',$joi2); my @new; my @seqid; foreach(@new){ my($seq_id,$seq)=split(/\n/,$_); push(@alp,split(' ',$seq)); push(@seqid,$seq_id); } my @numbers; my @numid; foreach(@numbers){ my ($num_id,$numb)=split(/\n/,$_); push(@num,split(' ',$numb)) +; push(@numid,$num_id) } my @keep= grep {$_ < 1 || $num[$_]>=10 || $alp[$_-1] ne $alp[$_-0]} 0. +.$#num; print (join(' ',@alp[@keep]),"\n"); print (join(' ',@num[@keep]),"\n");
the result which i got is
Use of uninitialized value in split at sample.pl line 15,<FH2> line 6. Use of uninitialized value in split at sample.pl line 21,<FH2> line 6. Use of uninitialized value in string ne at sample.pl line 24, <FH2> li +ne 6. Use of uninitialized value in join or string at sample.pl line 25, <FH +2> line 6. TGACTTTTGCAAAGCTCGTA TGACTTTTGCAAAGCTCGTA TGACTTTTGCAAAGCTCGTA + 34 45 34 23 32 43 54 45 3 +4 12 23 45 54 65 34 23 54 42 34 45 34 23 32 43 54 45 34 12 23 45 54 6 +5 34 23 54 42 34 45 34 23 32 43 54 45 34 12 23 45 54 65 34 23 54 42
Is this problem because i am using more than one string from 2 different files? in the above program, why are we not comparing the character repetition at all? In some cases, if the number is less than 10, but doesnt come into repeted continous characters, it should be removed. Please suggest what can be done. I am not very good at perl :-( Thanks

In reply to Re^2: deleting a particular character and its coresponding score in 2 different files!!! by heidi
in thread deleting a particular character and its coresponding score in 2 different files!!! by heidi

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.