If you want to keep using a regexp, then:
$mac =~ s/^(..)(..)(..)(..)(..)(..)$/$1:$2:$3:$4:$5:$6/ if $mac =~ /^[0-9A-F]{12}$/i;
In reply to Re: Insert colons into a MAC address
by tobyink
in thread Insert colons into a MAC address
by mantager
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |