in reply to Getting "un initialized value" error though variable is initialized. Please help.
And here is the output:#!/usr/bin/perl use warnings; use strict; my $wwn = 0; until ( $wwn eq "q") { print "Enter the wwn: "; chomp ($wwn=<STDIN>); 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>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Getting "un initialized value" error though variable is initialized. Please help.
by Anonymous Monk on Dec 17, 2011 at 16:26 UTC | |
by ww (Archbishop) on Dec 17, 2011 at 16:46 UTC | |
by Anonymous Monk on Dec 17, 2011 at 19:53 UTC |