Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Split Function - Positions

by meetraz (Hermit)
on Jun 02, 2004 at 00:40 UTC ( [id://358907]=note: print w/replies, xml ) Need Help??


in reply to Split Function - Positions

Will this do what you want?

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://358907]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-20 08:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found