in reply to ternary operator
Probably, you're not using strict and warnings. Either that, or you have both a scalar $col and an array @col in the same scope, which is just asking for confusion. Or, I suppose, both, but we'll assume just one at a time for now ;-)
$col->[26] = $col->[26] eq '0" ? '' : $col->[26]; # note the extra -> +in there that was missing from your code. # or, more succinctly: $col->[26] = '' if $col->[26] eq '0'; # or, probably better yet: $col->[26] ||= '';
|
|---|