Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^4: How to increment a MAC Address?

by dcd (Scribe)
on May 23, 2005 at 20:35 UTC ( [id://459705] : note . print w/replies, xml ) Need Help??


in reply to Re^3: How to increment a MAC Address?
in thread How to increment a MAC Address?

if $_ holds your string, then this should increment it
$_ = join ":",unpack "A2"x6, substr( ('0' x 12 . (1 + join '',split /:/,$_))), -12)