Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: dividing numbers

by Not_a_Number (Parson)
on Sep 20, 2011 at 18:49 UTC ( #926999=note: print w/ replies, xml ) Need Help??


in reply to dividing numbers

Well, just to show the Power of Perl, you could replace the entire contents of your foreach(my $protein=$seq->seq){ loop with:

my %count; $count{$_}++ for map uc, split '', $protein; for ( 'A' .. 'Z' ) { say RESULT "$_: ", $count{$_} / length $protein if $count{$_}; }


Comment on Re: dividing numbers
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2015-07-07 22:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls