On Dec 13, Jenda Krynicky said: > $num = ord($char) - ord('A') + 1 > >or if you do it often > > my $char_base = ord('A') - 1; > ... > $num = ord($char) - $char_base;
No benefit to that, really. ord('A') is calculated at compile-time, not run-time. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]