in reply to how do i split a link
It's best to use a module for HTML parsing, it's more complicated than it looks :). HTML::TokeParser should do nicely, there's even a tutorial on it here.