in reply to A confusing Use of uninitialized value
I'd first try to figure out why $_->[4] is undefined, or if it is, don't try testing its value or interpolating it into a string. But this should prevent the test that causes the warning without resorting to disabling warnings:
if( defined $_->[4] and $_->[4] ne "" ) { $float = join ',', @{$_}[1..4]; }
Note: The $_->[4] notation is functionally equivilant to, but IMHO easier to read than ${$_}[4]. I also happen to like using join on an array slice instead of typing out "${$_}[1],${$_}[2],${$_}[3],${$_}[4]", but that's not crucial to fixing your problem. The key is the defined test.
Dave
|
|---|