my $fmt = '%02x' x 6; $mac = sprintf $fmt, map hex, split /\./, $mac;