in reply to Tips on how to perform this substitution?

Two more ways to flip between 'i' and 'o':

$char = 'i'; $char = chr 216 - ord $char; $char =~ tr/io/oi/;