in reply to greping url from HTML file

HTML::LinkExtor and HTML::LinkExtractor look like a good starts.