@chars = split '', $string; for my $char (@chars) { my $ord = ord $char; print "$char $ord\n"; }