Use of uninitialized value in print at xxx line yyy, <STDIN> line 2 (# +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 tells you what ope +ration you used the undefined value in. Note, however, that perl optimiz +es your program and the operation displayed in the warning may not necessa +rily appear literally in your program. For example, "that $foo" is usually optimized into "that " . $foo, and the warning will refer +to the concatenation (.) operator, even though there is no . in your program.
The problem occurs on the following line:
print "$PID|$SID|",shift(@flds),"|$date\n";
To debug this, I changed this line to:
print shift(@flds),"\n";
and I still get the warnings messages. This leads me to believe that you are trying to shift an element from an empty array.
In reply to Re: Error: Uninicialized Value
by toolic
in thread Error: Uninicialized Value
by jw2523
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |