> >my @Fields = map {defined($_) ? $_ : undef} split(/,/);
> 
> But this has zero effect. You're turning undef into undef. There is no
> undefined value to begin with.
It did what he asked to do, but as you say, it is pointless and I should
have read it back before posting.

I adapted it from an a tool I sometimes use for display purposes:

my @data = map {defined($_) ? $_ : '[null]'} split(@$row);

or, as you pointed out for converting empty strings into null's.

my @data = map {length($_) ? $_ : undef} split(@$row);

--
  Simon Oliver

Reply via email to