#!/usr/bin/perl use strict; use warnings; open(FH1,"read.txt"); open(FH2,"qual.txt"); my @arr1=; my @arr2=; 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"); #### Use of uninitialized value in split at sample.pl line 15, line 6. Use of uninitialized value in split at sample.pl line 21, line 6. Use of uninitialized value in string ne at sample.pl line 24, line 6. Use of uninitialized value in join or string at sample.pl line 25, line 6. TGACTTTTGCAAAGCTCGTA TGACTTTTGCAAAGCTCGTA TGACTTTTGCAAAGCTCGTA 34 45 34 23 32 43 54 45 34 12 23 45 54 65 34 23 54 42 34 45 34 23 32 43 54 45 34 12 23 45 54 65 34 23 54 42 34 45 34 23 32 43 54 45 34 12 23 45 54 65 34 23 54 42