#!/usr/bin/perl use warnings; use strict; my $wwn = 0; until ( $wwn eq "q") { print "Enter the wwn: "; chomp ($wwn=); my @wwn = unpack ("(a2)*", lc($wwn)); @wwn = join (":", @wwn); print "@wwn\n"; } #### C:\Users\Documents\perl\practice>perl wwn.pl Enter the wwn: 10000000ABCDEFAB 10:00:00:00:ab:cd:ef:ab Enter the wwn: 10000000C9D2EEFG 10:00:00:00:c9:d2:ee:fg Enter the wwn: 500604AB12CDEFCD 50:06:04:ab:12:cd:ef:cd Enter the wwn: q q C:\Users\ugrankar\Documents\perl\practice>