in reply to Re: "Use of uninitialized value" annoying message
in thread "Use of uninitialized value" annoying message

Thank you very much. Kind regards, Kepler
  • Comment on Re^2: "Use of uninitialized value" annoying message

Replies are listed 'Best First'.
Re^3: "Use of uninitialized value" annoying message
by GrandFather (Saint) on Feb 21, 2011 at 09:18 UTC

    Unless you understand why the warning is being generated and are sure that undef is a valid value you should not turn the warning off. Even if you do decide to turn off the warning, you should constrain the scope of no warnings to the smallest scope possible:

    { no warnings 'uninitialized'; $j =~ s/\;/\,/gi; }

    However it's not at all clear from your code that turning off the warning is appropriate. Make sure you understand what's going on before you opt for that solution!

    True laziness is hard work