How about using Net::Traceroute and using the output to give you the default GW?
Clare
In reply to Re: Checking my default gateway by claree0 in thread Checking my default gateway by Piercer