in reply to Re: Merging of arrays with space
in thread Merging of arrays with space
Mine is a csv file . this is what i have written, the problem is that spaces gets overlooked
sub column_segregation{ $column_number=$_[0]; my $size; my @array_A1=(); my @array_A2=(); my $column_separator = ","; $column_number--; my $file="Working_On.csv"; open(FILE,"<","$file"); my @lines=<FILE>; close FILE; foreach my $line (@lines) { my @columns = split(/$column_separator/,"$line"); @array_A1= split (/$column_separator/,"$columns[$column_number]"); + @array_A2=(@array_A2,@array_A1); + exit} return (@array_A2); }
so if you can point out why the spaces are being overlooked , the above functions separates out the column number from csv file into array
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Merging of arrays with space
by hdb (Monsignor) on Jun 05, 2013 at 07:11 UTC | |
by MynameisAchint (Novice) on Jun 05, 2013 at 08:01 UTC | |
|
Re^3: Merging of arrays with space
by davido (Cardinal) on Jun 05, 2013 at 08:15 UTC | |
by MynameisAchint (Novice) on Jun 05, 2013 at 08:18 UTC | |
by davido (Cardinal) on Jun 05, 2013 at 08:24 UTC | |
|
Re^3: Merging of arrays with space
by jnyman (Acolyte) on Jun 05, 2013 at 07:31 UTC |