my $str = "abcdef"; my @nums = map ord, split //, $str; print join ' ', @nums;