my $val; map { $val .= sprintf("%02x",$_) } unpack "CCCCCC", $octetstr; $mac=join(".",unpack("a4 a4 a4",$val));