RE: num to alpha

2006-02-27 Thread Timothy Johnson
number.\n; } -Original Message- From: The Ghost [mailto:[EMAIL PROTECTED] Sent: Sunday, February 26, 2006 10:28 PM To: Perl Beginners Subject: num to alpha What's the easiest way for me to turn a number into a letter? 2 - b 5 - e 26 - z 27 - error

RE: num to alpha

2006-02-27 Thread Keenan, Greg John (Greg)** CTR **
my %convert = qw[ 1 a 2 b 3 c 4 d 5 e 6 f 7 g 8 h 9 i 10 j 11 k 12 l 13 m 14 n 15 o 16 p 17 q 18 r 19 s 20 t 21 u 22 v 23 w 24 x 25 y 26 z ]; Hi, I know John Krahn is a fan of %map. He has advised me on using it before. Just wondering if there was any reason he chose to use %convert instead

Re: num to alpha

2006-02-27 Thread John W. Krahn
Timothy Johnson wrote: Just for the sake of one more way to do it: ### use strict; use warnings; my %numbers; my $letter = 'a'; my $userinput = 23; foreach(1..26){ $numbers{$_} = $letter; $letter++; } Or: my %numbers; @numbers{ 1 .. 26 } = 'a'

Re: num to alpha

2006-02-27 Thread John W. Krahn
Keenan, Greg John (Greg)** CTR ** wrote: my %convert = qw[ 1 a 2 b 3 c 4 d 5 e 6 f 7 g 8 h 9 i 10 j 11 k 12 l 13 m 14 n 15 o 16 p 17 q 18 r 19 s 20 t 21 u 22 v 23 w 24 x 25 y 26 z ]; Hi, Hello, I know John Krahn is a fan of %map. I am? He has advised me on using it before. Just

RE: num to alpha

2006-02-27 Thread Keenan, Greg John (Greg)** CTR **
I know John Krahn is a fan of %map. I am? He has advised me on using it before. Just wondering if there was any reason he chose to use %convert instead in his example above. %map and %convert are just hash names, you can use any name that you want. Sorry - my mistake. Still trying to

Re: num to alpha

2006-02-27 Thread John W. Krahn
Keenan, Greg John (Greg)** CTR ** wrote: I know John Krahn is a fan of %map. I am? He has advised me on using it before. Just wondering if there was any reason he chose to use %convert instead in his example above. %map and %convert are just hash names, you can use any name that you want.

num to alpha

2006-02-26 Thread The Ghost
What's the easiest way for me to turn a number into a letter? 2 - b 5 - e 26 - z 27 - error -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response