in reply to Automated Browsing

Well, the code that you have is indeed working. You are getting back the web page just like you had typed in the URL: http://search.cpan.org/search?query=libwww-perl&mode=dist . The script could have just done a GET on that URL. Yes, you get the html page. If you save it, you can open it with say Firefox.

I think there is mis-understanding here: "pop up the resulting webpage". LWP and Mechanize have nothing to do with displaying a webpage. That's what browsers do. If what you really mean is that you want to control what Firefox does from Perl, then I think you want WWW::Mechanize::Firefox. It is this display requirement that LWP and Mechanize alone can not do.