use WWW::Mechanize::Firefox; my $mech = WWW::Mechanize::Firefox->new( launch => '/Applications/Firefox.app/Contents/MacOS/firefox', ); $mech->get('http://google.com'); #### I, MOZREPL : Client connected : 127.0.0.1:57788 : chrome://browser/content/hiddenWindow.xul Can't call method "addTab" on an undefined value at /Library/Perl/5.12/Firefox/Application/API40.pm line 131.