Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Finding Windows XP CD Keyby CharlesClarkson (Curate) |
on Oct 31, 2005 at 05:31 UTC ( [id://504152]=note: print w/replies, xml ) | Need Help?? |
@bKeyChars is being translated using ord() then translated back using chr(). The dashes can be added using a regex outside the first loop simplifying the outer loop. @bProductKey can be found without a need for @bDigitalProductID. The for loops can be rewritten to a more "perlish" style and we can step through @bProductKey without resorting to indexes. Finally, we can get rid of the Hungarian notation.
This makes for a little cleaner look, not a speed increase. I tend more toward clean, maintainable code than fast code.
HTH, Charles
In Section
Code Catacombs
|
|