--- "Collins, Joe (EDSI\\BDR)" <[EMAIL PROTECTED]> wrote: > Hi, > > How can I convert the scalar 'A' (or 'a') to 1, 'B' to 2 and so on?
my %alpha_to_num; @alpha_to_num{ A .. Z } = ( 1 .. 26 ); print $alpha_to_num{ A }; > Related: how do I get the true internal value for A, i.e. ascii value? print ord('A'); Cheers, Curtis "Ovid" Poe ===== Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __________________________________________________ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]