in reply to Re^2: Getting "un initialized value" error though variable is initialized. Please help.
in thread Getting "un initialized value" error though variable is initialized. Please help.

++ for the do { ...; } loop, annonymonk, but not so much for
"it's confusing that you have @wwn and $wwn."

Respectfully disagree: where an array is the child of a string (or vice versa), having both use the same base_name makes all the sense in the world to me... and from the original post, it's pretty clear that "wwn" is a meaningful name to the OP (ie, not a case of naming stuff $var1, $var2, @arr3, %h4 or the like, which, of course, would warrant advice to select meaninful names like $ip, $mac, @wwm... (sorry, no hash example in the OP).

  • Comment on Re^3: Getting "un initialized value" error though variable is initialized. Please help.
  • Select or Download Code

Replies are listed 'Best First'.
Re^4: Getting "un initialized value" error though variable is initialized. Please help.
by Anonymous Monk on Dec 17, 2011 at 19:53 UTC

    Well, you're just defending it because it happens to contain your initials =P

    Anyway, I'd rename the scalar to $input as that makes sense to me. That is just my opinion, though. There are other small problems such as @wwn = join (":", @wwn); (empty an array and assign a scalar value into an array's first slot) -- that is, use a previously-defined array as a scalar variable -- but I'm not to split hairs over it as the OP did not ask to review his code.