Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Insert colons into a MAC address

by choroba (Cardinal)
on Jan 13, 2012 at 15:12 UTC ( [id://947760]=note: print w/replies, xml ) Need Help??


in reply to Insert colons into a MAC address

Using look-ahead not to insert final colon:
$mac =~ s/(..)(?=.)/$1:/g

Replies are listed 'Best First'.
Re^2: Insert colons into a MAC address
by kennethk (Abbot) on Jan 13, 2012 at 16:05 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-23 06:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found