Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

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:


your code outputs:


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


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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://975171]
[Tanktalus]: choroba: do I have to move? :)
Discipulus has too much roots in a 2770 yo town
[marioroy]: I want a job after completing MCE in about a week. But feel that I've moved to the wrong place.
[choroba]: I fear so. We have offices in Prague, Brno, Saigon and San Francisco.
[Discipulus]: choroba if let your company to hire Tanktalus and marioroy ... what a big fishing!
[Discipulus]: i choice prague!!
[choroba]: 1200 years is enough :-)
[marioroy]: Lady_Aleena my $ans = qx! find . -name "*.pl" -exec ls -l {} \\; !;
[Tanktalus]: My basic problem right now is that if I were willing to move, I could be back in Toronto with a pay raise. We have a number of reasons for not wanting to do that.
[marioroy]: I had to backslash the backslash inside qx.

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2017-04-23 20:09 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (432 votes). Check out past polls.