http://qs321.pair.com?node_id=1073875


in reply to How to print the actual bytes of UTF-8 characters ?

I think you need something like this:
#!/usr/bin/perl use utf8; my $str = 'Ð Ñ Ò Ó'; print $str."\n"; foreach my $ch (split('', $str)) { print ord($ch)."\n"; } use bytes; print "bytes\n"; foreach my $ch (split('', $str)) { printf("%x %b\n", ord($ch), ord($ch)); }