At 9:47 AM -0600 2/3/11, Harry Putnam wrote:
Rob Dixon <rob.di...@gmx.com> writes:

 Hey Harry

 As Jim says, there is very little chance that you will find an existing
 module that conforms to such a tight specification, but such a facility
 is trivial to write. Take a look at the program below and see if it
 > helps you with a solution.

[...] Skipped nifty script

First off, this program appears to work flawlessly.
I'm really not able to follow the code very far at all.

I wonder why it appears to favor uppercase, or really even use
uppercase at all.  And I was pleasantly surprised with the brevity of
the names produced.

I don't see where in the code that upper case happens.

This line assigns an upper-case letter to $d if $d has a value greater than or equal to 10. A value of 10 is replaced by 'A', 11 by 'B', etc.

    $d = chr($d + ord('A') - 10) if $d >= 10;

You can try changing that 'A' to 'a' and see what you get. I haven't tried to comprehend the rest of the logic of Rob's program, but that line stands out like a sore thumb when it comes to "uppercase".

--
Jim Gibson
j...@gibson.org

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to