On Fri, 2008-09-05 at 07:58 -0700, John W. Krahn wrote: > my $ctrl_code = ord( $char ) - ord( '@' ); > printf <<'FORMAT', $char, $ctrl_code; > control code: ^%s > decimal: %d > octal: \%2$03o > hexadecimal: \x%2$02x > FORMAT >
printf <<'__end_of_data__', $char, ($ctrl_code) x 3; control code: ^%s decimal: %d octal: \%03o hexadecimal: \x%02x __end_of_data__ __END__ (^_^) -- Just my 0.00000002 million dollars worth, Shawn "Where there's duct tape, there's hope." Cross Time Cafe "Perl is the duct tape of the Internet." Hassan Schroeder, Sun's first webmaster -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/