$ perl -wE 'my $str = "JA_PH"; $str =~ s/_/\s/; say $str' Unrecognized escape \s passed through at -e line 1. JAsPH $ perl -wE 'my $str = "JA_PH"; $str =~ s/_/ /; say $str' JA PH