in reply to Removing underscores.
$txt = "This_is_a_song_.mp3"; substr($txt, rindex($txt, '_'), 1) = ''; print $txt; [download]
$txt = "This_is_a_song_.mp3"; $txt =~ s/(.*)_/$1/; print $txt; [download]