in reply to help speeding up my perl code
Instead of setting $Chr{$key} = undef, set it to 1. Then, instead of looping through each key in the hash to find a match, you can just do a if ($Chr{$line[0]}). I only glanced over your code, so I may have missed something that would stop this from working, but there is a definite red flag when you are looping over the keys in a hash and comparing each one to some value.
--MidLifeXis
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: help speeding up my perl code
by SuicideJunkie (Vicar) on Sep 01, 2011 at 13:10 UTC |