http://www.perlmonks.org?node_id=26321


in reply to Re: One for the regexp fans
in thread One for the regexp fans

davorg says:
It's still two lines, but the first is just there so I don't have to type '%02x' six times :)
Well then, don't!
$mac = sprintf "%02x" x 6, map hex, split /\./, $mac;
There. One line. :)

-- Randal L. Schwartz, Perl hacker