Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Crypt::Navajoby Arien (Pilgrim) |
on Jan 17, 2003 at 12:27 UTC ( [id://227659]=note: print w/replies, xml ) | Need Help?? |
Some things I noticed when reading through your code... Both your encryption and your decryption dictionaries have duplicate entries. Of course, only one of these (the last) will be used as the key in the hash. After seeing a couple, I wrote a script to find all duplicates. This is the output:
You can use Carp's croak (and carp) instead of die (and warn) to help the user of your module to find where things went awry in his code. tr works with character ranges, not regular expressions. Why use indexes in your foreach loops? You can use (implicit) aliases for the current element, leading to clearer and less cluttered code, eg this chunk from your encrypt sub:
— Arien
In Section
Code Catacombs
|
|