$string = 'This_has_underscores'; $result = $string =~ s/_/ /g; print $result;