in reply to alphabet counting
What have you done to get to the cause of your problem?
Please describe in your own words what your program should do, and how many lines of output you expect. Then also describe in your own words what your program does. As a hint, it likely helps if you properly indent your source code so that for each loop, you put four spaces before all statements contained in the loop body:
foreach( @protein) { if (...) { ... } elsif (...) { ... } ... };
That way, it will likely become more clear to you where your error happens.
Also, using a different data structure, like a hash, will make your program much shorter:
my %count; foreach( @protein ) { $count{ $_ }++; ... };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: alphabet counting
by Anonymous Monk on Jun 02, 2012 at 13:27 UTC | |
by Corion (Patriarch) on Jun 02, 2012 at 13:29 UTC | |
by Anonymous Monk on Jun 02, 2012 at 13:40 UTC |