in reply to Insert colons into a MAC address

Using look-ahead not to insert final colon:
$mac =~ s/(..)(?=.)/$1:/g

Replies are listed 'Best First'.
Re^2: Insert colons into a MAC address
by kennethk (Abbot) on Jan 13, 2012 at 16:05 UTC