Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2014
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #!/usr/bin/perl
  2. open ($inp0,"<myresult") or die "not found";
  3. open ($inp2,"<annotation") or die "not found";
  4. open ($out,">output");
  5. my @arr2=<$inp0>;
  6. my @arr4=<$inp2>;
  7. my $from = (split /../, $arr2[0])[0];
  8. my $to = (split /../, $arr2[-1])[1];
  9.  
  10. for my $i ($from .. $to) {
  11. print $out "$in" if grep inside($i, $_), @arr2 and grep inside($i, $_), @arr4 ;
  12.  
  13. }
  14. sub inside {
  15. my ($i, $range) = @_;
  16. my ($from, $to) = split /../, $range;
  17. return ($from <= $i and $i <= $to)
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement