Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

RE: Re: One for the regexp fans

by merlyn (Sage)
on Aug 05, 2000 at 10:06 UTC ( #26321=note: print w/ replies, xml ) Need Help??


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


Comment on RE: Re: One for the regexp fans
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://26321]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2015-07-06 22:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (84 votes), past polls