According to the documentation for WWW::Mechanize, it should return a WWW::Mechanize::Link object. In the documentation for WWW::Mechanize::Link you should be able to get the actual URL with the url method of the object, like so:
$link->URI() will also give you one of Uri's URI::URL objects, which will stringify nicely.
I'd imagine that you can also do whatever the regex was to do by calling $link->URI()->param or other methods to get or replace which ever bits or the uri you want to change
@_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;