In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote:
> 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. there's a design benefit, because you only have to change the definition of $char_base in one place. however, a subroutine would be even better. :) -- brian d foy <[EMAIL PROTECTED]> - Perl services for hire CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]