Hi everyone,
Coul you please help me to find the position between Star_poso and end_posi.
I have two data
Data 1:
Num Posi
1 2
2 5
3 9
4 16
5 19
.. ..
Data 2:
Num Star_posi End_posi
1 1 10
2 15 18
3 26 30
.. ... ...
I want to identifi Data 1 contain in Data 2 or not?
I make the script with perl in below but I just only sort with the Sta_posi. I hope I can check Data 1 between Star_posi and end _posi.
I would appreciate if you could give some pointers.
(Toggle Plain Text)
#1 #!/usr/bin/perl -w
use strict;
use warnings;
use Data::Dump qw(dump);
#Sort the position**************
my (@posi1, $Num2, @Num2, @Num1);
open(POS1,"<posi.txt");
@posi1=<POS1>;
@Num1=@posi1;
open(LIST,">list.txt"); {
@Num2= sort {$a <=> $b} @Num1;
$Num2 = join( '', @Num2);
print $Num2;
print LIST $Num2."\n";
}
close(LIST);