Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: stupid/simple mistake

by rnaeye (Pilgrim)
on Oct 18, 2011 at 17:02 UTC ( #932197=note: print w/ replies, xml ) Need Help??


in reply to stupid/simple mistake

This works for me:

my $substring = 'GATC'; my$i=0; my$count; my $sequence; while ($sequence=<DATA>){ foreach($sequence =~ /($substring)/g) { print "$1\n"; $count++; } } print "There are $count negative numbers in the string\n"; __DATA__ GAGAGACCCCGATCGAGAGACCCGATCFGAGAVCTGATCCCC


Comment on Re: stupid/simple mistake
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2014-09-16 04:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (155 votes), past polls