With WWW::Mechanize::Firefox there is no direct network connection, all it is doing is controlling a Firefox web browser which handles everything on its own. So you're really asking a Firefox question*.
However, as far as I know there is no way to bind Firefox to a specific local interface. Instead you would have to configure your operating system to recognize and route the IP traffic as you wish. Alternatively you may be able to setup a proxy server to do this and then configure Firefox to use it instead of talking directly to the external network.
* It is considered polite to mention that you already asked your question on Stackoverflow.
|