my $mac_re = do { my $tmp = join ':', ('[0-9a-f]' x 2) x 6; qr/$tmp/i; };