in reply to "Use of uninitialized value" annoying message
Use of uninitialized value in substitution (s///) at /home/rui/public_html/cgi-bin/e/e_update.pl line 49 (#1) (W uninitialized) An undefined value was used as if it were alread +y defined. It was interpreted as a "" or a 0, but maybe it was a mi +stake. To suppress this warning assign a defined value to your variables. To help you figure out what was undefined, perl will try to tell y +ou the name of the variable (if any) that was undefined. In some cases it + cannot do this, so it also tells you what operation you used the undefine +d value in. Note, however, that perl optimizes your program and the opera +tion displayed in the warning may not necessarily appear literally in y +our program. For example, "that $foo" is usually optimized into "that + " . $foo, and the warning will refer to the concatenation (.) operat +or, even though there is no . in your program. Use of uninitialized value in length at /home/rui/public_html/cgi-bin/e/e_update.pl line 53 (#1)
Or you could turn any undefined values from split into empty string
Its much less work to let Text::CSV handle CSV... $j) = map { defined ? $_ : '' } split ...
|
|---|