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!
There. One line. :)$mac = sprintf "%02x" x 6, map hex, split /\./, $mac;
-- Randal L. Schwartz, Perl hacker
|
---|
In Section
Seekers of Perl Wisdom