in reply to Re: Getting "un initialized value" error though variable is initialized. Please help.
in thread Getting "un initialized value" error though variable is initialized. Please help.
You can also use this alternative loop style that will always run at least once:
my $wwn; do { print "Enter the wwn: "; chomp ($wwn=<STDIN>); my @wwn = unpack ("(a2)*", lc($wwn)); @wwn = join (":", @wwn); print "@wwn\n"; } until ($wwn eq "q");
Also, it's confusing that you have @wwn and $wwn. You should consider renaming one.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Getting "un initialized value" error though variable is initialized. Please help.
by ww (Archbishop) on Dec 17, 2011 at 16:46 UTC | |
by Anonymous Monk on Dec 17, 2011 at 19:53 UTC |