in reply to Re^2: Merging of arrays with space
in thread Merging of arrays with space
The reason for spaces being skipped is in your line
@array_A1= split (/$column_separator/,"$columns[$column_number]");
If $columns[$column_number] is the empty string (not " " but ""), then your split will return an empty array, ie you lose your blank cell you are looking for.
I would think instead of
@array_A1= split (/$column_separator/,"$columns[$column_number]"); @array_A2=@array_A2,@array_A1);
you should just do
push @array_A2, $columns[$column_number];
I assume the exit statement is left from debugging but it will stop execution of the script immediately which makes no sense at this point.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Merging of arrays with space
by MynameisAchint (Novice) on Jun 05, 2013 at 08:01 UTC |