There might be a way to ask XP to ask dd-wrt to DNAT the port on your behalf... Otherwise, it appears Net::UPnP is designed to do what you're looking to do. It's just a matter of navigating that documentation.
It seems you want to make a control point, somehow locate the devices, and then issue a postaction.
I'm fuzzy on the details, but I bet it looks something like this:
use Net::UPnP::ControlPoint;
my $obj = Net::UPnP::ControlPoint->new();
my @dev_list = $obj->search(st =>'????', mx => 3);
my $service = $dev->getservicebyname('?????');
$service->postaction('????', { ??? => ???});
|