http://www.perlmonks.org?node_id=89435


in reply to What regex will swap somewebpage/ with somewebpage/index.html ??

if you know you will always add 'index.html', a regex is too much. Try this:
$address .= '/index.html'
if you won't always add it, try this as a regex:
$address =~ s!http://www.(?:[^/]*/*)*!/index.html!