in reply to Re: Use perl to do direction matching
in thread Use perl to do direction matching
After i declare the variable as you suggested, it comes out another error, said 'use of uninitialized value $A in concatenation <.>.....'
#Main body while (my $line = <TEMP>) { my $A; my $B; my @column = split (/,/,$line); if ($column[4] < $column[7]) { $A = $direction[0]; }else {$A = $direction[1]; } if ($column[5] < $column[8]) { $B = $direction[2]; }else {$B = $direction[3]; } my $dir = $A.$B; print OUTPUT $column[4],$comma,$column[5],$comma,$column[7],$comm +a,$column[8],$comma,$dir,$comma,$nline; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Use perl to do direction matching
by moritz (Cardinal) on Oct 09, 2009 at 15:36 UTC |