Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: What is wrong in this code???

by Lotus1 (Curate)
on Dec 07, 2012 at 22:01 UTC ( #1007830=note: print w/replies, xml ) Need Help??

in reply to What is wrong in this code???

tr/// can be used to count characters in a string. No need to loop through.

use warnings; use strict; print "LATCG-\n"; while(<DATA>) { print $. . tr/A// . tr/T// . tr/C// . tr/G// . tr/-// . "\n"; } __DATA__ ATGAAAAAGAC AGCTATCGCGA TTGCAGTGGCA CTGGCTGGTTT CGCTACCGTAG CGC-A---TAG


LATCG- 171120 232330 323240 405240 522430 621224

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1007830]
[1nickt]: choroba Updated the PR, using Config instead of exposing the hackery. Using cpanfile-dump does not work to test, as shown in the earlier PR comment, even when using a binary built for a particular Perlbrew perl, the output seems to be
[1nickt]: ... from the system perl binary. Using cpanm --installdeps . does use the expected perl and tus the check acts correctly.

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (15)
As of 2017-10-18 16:03 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (249 votes). Check out past polls.