Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: how to find this substring?

by Not_a_Number (Parson)
on Jun 08, 2012 at 14:08 UTC ( #975171=note: print w/replies, xml ) Need Help??


in reply to Re: how to find this substring?
in thread how to find this substring?

From the OP:

I need to read some DNA sequences and check if they start with 'ATG' and end in 'TAA', 'TAG' or 'TGA'

Given the sequence:

ATGXXXTAAXXXTAA

your code outputs:

ATGXXXTAA

whereas it should print the whole string (or 'true', or whatever).

Replies are listed 'Best First'.
Re^3: how to find this substring?
by Anonymous Monk on Jun 08, 2012 at 14:15 UTC

    (o.O)

    So, why can't you change line 6 to be print "whatever\n\n";?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://975171]
help
Chatterbox?
[stevieb]: I have fixed a boatload of issues across several of my distributions, including a couple that have been nagging for a very long time and were exceptionally difficult to solve. Saving $ before we move, so thought I'd have a code session...
[stevieb]: ...session weekend. Went far better than I could have imagined. Even got a bunch of stuff soldered for another one of my electronics projects on the go, and am working on a fix for a MetaCPAN::Client issue I found
[shmem]: the smaller your boat is, the smaller is the load...
shmem is going to look for problems with C++. Urgh.
choroba has worked on the Pull Request Challenge
[stevieb]: shmem I had to do that yesterday and earlier today (C++ issues). It was only fun after I figured it all out.
[stevieb]: it won't be long before I likely won't have much time to do a lot of coding...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2017-06-25 22:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (571 votes). Check out past polls.