http://www.perlmonks.org?node_id=26279


in reply to (Adam: JoinMapSplit) RE: One for the regexp fans
in thread One for the regexp fans

How about using sprinf: $mac = join "", map {sprintf "%02s", $_} split '\.', $addr
  • Comment on RE: (Adam: JoinMapSplit) RE: One for the regexp fans

Replies are listed 'Best First'.
RE: RE: (Adam: JoinMapSplit) RE: One for the regexp fans
by PrakashK (Pilgrim) on Aug 05, 2000 at 02:11 UTC
    Forgot to put CODE tags, so I am replying to myself.

    <CODE>$mac = join "", map {sprintf "%02s", $_} split '\.', $addr<CODE>

RE: RE: (Adam: JoinMapSplit) RE: One for the regexp fans
by PrakashK (Pilgrim) on Aug 05, 2000 at 02:10 UTC
    Forgot to put CODE tags, so I am replying to myself. <CODE>$mac = join "", map {sprintf "%02s", $_} split '\.', $addr<CODE>