or die "** Cannot run 'ip address' or 'ifconfig -a'\n";
while (not ($parm_ipv4 and $parm_ipv6) and defined($_ = <IFCONFIG>))
{
- if (/^(?:[0-9]+: )([^:]+): /) { $ifname = $1; }
+ if (/^(?:[0-9]+: )?([^:]+): /) { $ifname = $1; }
if (not $parm_ipv4 and /^\s*inet(?:\saddr)?:?\s?(\d+\.\d+\.\d+\.\d+)(?:\/\d+)?\s/i)
{