develooper Front page | perl.beginners | Postings from February 2011

Re: Renaming with a specific spec

Thread Previous | Thread Next
From:
Harry Putnam
Date:
February 3, 2011 14:05
Subject:
Re: Renaming with a specific spec
Message ID:
877hdgdbc7.fsf@newsguy.com
Jim Gibson <jimsgibson@gmail.com> writes:

> 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".

Thanks for the tip.

Changing to lowercase (`a') as you suggested fixed it so no uppercase
letters appear now.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About