>>>>> "Edward" == Edward Moon <[EMAIL PROTECTED]> writes:
Edward> Here's a script from 'Web Client Programming with Perl' that
Edward> shows how to expand relative URLs:
heh. pretty common, i tend to over-engineer my solutions pretty
heavily. only comments regarding this script:
1. HTML::Parse is deprecated (it is one of the modules replaced by
Sean Burke's new treebuilder stuff)
a similar approach could probably be done with HTML::LinkExtor.
2. it doesn't seem to handle <BASE...> tags. not that they're overly
common, but when they're given, they should be used for
absolutizing URLs.
3. it doesn't actually replace the URLs "in place"; you can use the
idea from "Bernie Aua" <[EMAIL PROTECTED]> to do a massive search
and replace after you have the mapping from relative -> absolute
URL, but that could be tricky in limited cases:
we have some pictures <a href="pictures">here</a>.
you need a bit of intelligence to make sure you only replace the
appropriate strings.
thanks for the small example, anyway!
t.
--
Tkil * <URL: http://slinky.scrye.com/~tkil> * hopelessly hopeless romantic.
"So amplify this little one | She hears as much as she can see
She's a volume freak | And what she sees, she can't believe."
-- Catherine Wheel, _Happy Days_, "Judy Staring At The Sun"