My hint is to not trust your logging further up and to move the logging to where the problem is. If $data is undef, then $datapair does not contain a =.
So, investigate $datapair and the contents of @data just before your loop.
Maybe/most likely, $line is not what you think it is. Maybe it ends with a comma and a newline, and split helpfully keeps that newline as its own element in @data?
In reply to Re: Use of uninitialized value $data
by Corion
in thread Use of uninitialized value $data
by ImJustAFriend
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |