$text = 'www.google.de/foo/bar.html'; $text =~ s![^/]*$!!; print $text, $/;