my $ohm = '24Ù'; $unit = substr $ohm, -1; print "$unit\n"; # This will return a ? in my CMD be aware that you cannot see the Ohm character