Think about Loose Coupling | |
PerlMonks |
Re^3: renaming 1000's of FASTA filesby CountZero (Bishop) |
on Jul 12, 2011 at 13:18 UTC ( [id://913915]=note: print w/replies, xml ) | Need Help?? |
You realize you have a problem here? You keep a hash with key the ID without the ending of "_xxx" and value the ID with the ending. But a hash-element can have only ONE value, so you overwrite the older elements with the newer, unless you take care and store the IDs in an array and then store the arrayref as a value in the hash-element. CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
In Section
Seekers of Perl Wisdom
|
|