in reply to Regex question: Is there a better way?

add in a base href tag:
# create html my $base = qq(<BASE HREF="$urltodir">); # add base tag to page - assumes all pages well formed $content =~ s/(<HEAD>)/$1$base/is;

That way you don't have to run a bunch of regexps on the page - good practice, but not needed :)

cLive ;-)