$newstring =~ tr/01/LH/; #### $newstring =~ s/0/L/g; $newstring =~ s/1/H/g;