sub major_section { $sec = shift; if ( $sec =~ /^([A-Z])$/ ) { return ( ord $1 - ord 'A' + 1 ); } else { return 0; } }