in reply to Split Function - Positions
use strict; my @genes; my $screen = "ATCGATCGXXXXXATCGATXXXACTGCTACGGTACXXXAATTATXGCGCGXXT"; while ($screen =~ /(^|(?<=X))([^X]+)/g) { print "Gene $2 found at position ", length($`), "\n"; }
Update: added $2 gene string.
|
|---|