$ perl -le ' use Regexp::Common qw(URI); $_ = "http://www.example.com/ciao,"; s/$RE{URI}{HTTP}/doh!/; print ' doh!