Skip to content

Instantly share code, notes, and snippets.

@wakuteka
Created September 1, 2015 09:05
Show Gist options
  • Save wakuteka/52028dea7c10bedfee6c to your computer and use it in GitHub Desktop.
Save wakuteka/52028dea7c10bedfee6c to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
my $target="ATcgAGCGTTTCG";
print $target."\n";
$target=uc("ATcgAGCGTTTCG");
my @pos;
@pos[0]=0;
for(my $i=1; $i<=3; $i++){
@pos[$i] = index($target,"CG",@pos[$i-1]) + 1;
print "$i\t@pos[$i]\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment