#!/usr/bin/perl

open(IFCON, "ifconfig|");
while(<IFCON>) {
	if(/P\-t\-P\:(\S+)\s/) {
		system("route add default gw $1");
	}
}
