Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Perl] Pick outgoing IP for network connections?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
incidenta5
n00b
n00b


Joined: 07 Jul 2007
Posts: 23
Location: ~/

PostPosted: Wed May 14, 2008 12:17 pm    Post subject: [Perl] Pick outgoing IP for network connections? Reply with quote

I have a server provisioned with two IP addresses, one attached to eth0 and another to eth0:0. There are a few perl scripts running on it that I'd like to have use the second IP for outgoing connections (much in the same way that apache can listen in on <ip>:80 and <ip2>:80 in its config file.

Will this work as-is?
Code:

$mech = WWW::Mechanize->new(LocalAddr => "ip#2");
$mech->get("http://ip#1/somepage.html");


-I
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum