in reply to Script to convert HBA WWNs to lowercase and add ":"[Updated]

Hi Not_A_Number,

Thats what I was looking for sire !!

Infact I have posted the updated version of this in the SoPW, here is the link - http://www.perlmonks.org/?node_id=944104

I will use your suggestions and update it soon. Thank you very much.

Perl Version - (v5.14.2) MSWin32-x64-multi-thread on Windows 7 64 Bit.

Replies are listed 'Best First'.
Re^2: Script to convert HBA WWNs to lowercase and add ":"
by Anonymous Monk on Jun 09, 2017 at 15:07 UTC
    echo 20000090fa173c04 | perl -lane 's/(..)/$1:/g && chop; + print'
    or
    echo 20000090fa173c04 | perl -lane 's/(..)/$1:/g && chop; + print lc'
    or
    echo 20000090fa173c04 | perl -lane 's/(..)/$1:/g && chop; + print uc'