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

Re^3: Script to convert HBA WWNs to lowercase and add ":"

by samwyse (Scribe)
on Jan 18, 2012 at 17:34 UTC ( #948597=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Script to convert HBA WWNs to lowercase and add ":"
in thread Script to convert HBA WWNs to lowercase and add ":"[Updated]

I like to "correctly" handle the case where there may already be colons in the string.

perl -E"$_=lc'02468ACE';s/[^:]{2}(?=[^:])\K/:/g;say" 02:46:8a:ce perl -E"$_=lc'02:46:8A:CE';s/[^:]{2}(?=[^:])\K/:/g;say" 02:46:8a:ce


Comment on Re^3: Script to convert HBA WWNs to lowercase and add ":"
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2014-12-27 04:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls