##
val = '';
map { $val .= sprintf("%02x",$_) } unpack "CCCCCC", $octetstr;;
$mac = join( ":", unpack("a2 a2 a2 a2 a2 a2", $val ) );;
print $mac;;
ab:cd:00:1d:94:56
##
##
$mac = join ':', unpack '(H2)*', $octetstr;;
print $mac;;
ab:cd:00:1d:94:56