Normally it is the responsibility of the operating system
to route packets out the apropriate interface. If you have
root level access to the system you are running this script on you
may be able to get the OS to route the packets out another (virtual) interface
by messing with the routing table (on UNIX this would probably be done with
system calls to the route command). Alternatively, you might be able to do something
with ifconfig by changing the IP address on the port itself. The
IO::Socket::INET module does take a LocalHost argument that may
do the trick for you (of course, at that point you'd be dumping LWP and
have to write all that functionality yourself).
Les Howard
www.lesandchris.com
Author of Net::Syslog and Number::Spell