Combined Two CSV Lines

I have two CSV lines, I.e.:

Line 1 = the,quick,brown,fox,   ,jumps,      ,the,    ,dog
Line 2 = the,quick,brown,fox,   ,       ,over,    ,lazy,dog

Literally, columns missing from line 1 exist in line 2.

Any suggestions on quick ways to combined these two lines into one line:

New line:

the,quick,brown,fox,,jumps,over,the,lazy,dog

Thanks.

Here is one way to do it:

#!/usr/bin/ksh
IFS=','
set -A mL1 $(sed -n '1s/ //gp' File)
set -A mL2 $(sed -n '$s/ //gp' File)
typeset -i mI=0
while [[ ${mI} -lt ${#mL1[*]} ]]; do
  if [[ "${mL1[$mI]}" != "" ]]; then
    mOut=${mOut}','${mL1[$mI]}
  else
    mOut=${mOut}','${mL2[$mI]}
  fi
  mI=${mI}+1
done
IFS=''
echo ${mOut} | sed 's/,//'

Here is another way:

@line1 = split /,/, <DATA>;
@line2 = split /,/, <DATA>;

for (0..$#line1)  {
    if ( $line1[$_] =~ /^\s*$/ )  {
        print $line2[$_] if ( defined $line2[$_] );
    } else {
        print $line1[$_];
    }
    print "," if ( $_ != $#line1 );
}

__DATA__
the,quick,brown,fox,,jumps,,the,,dog
the,quick,brown,fox,,,over,,lazy,dog

Which actually prints this,

the,quick,brown,fox,,jumps,over,the,lazy,dog