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


in reply to Re^3: How to reverse a (Unicode) string
in thread How to reverse a (Unicode) string

As for the question you added,

Explain why you think this……should produce different output than this…

I agree that there should be a function that does that, but it's not reverse.

Explain why you think

my $water_samples = join '', map chr, 113, 101, 769; my $last_sample = substr($water_samples, -1, 1); print(ord($last_sample), "\n");

should produce different output than

my $water_samples = join '', map chr, 113, 101, 769; $water_samples = reverse($water_samples); my $last_sample = substr($water_samples, 0, 1); print(ord($last_sample), "\n");

Update: Corrected my numbers.