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 reply to RE: Re: One for the regexp fans
by merlyn
in thread One for the regexp fans
by Odud
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |