in reply to Re^2: replace a column
in thread replace a column
while (<FILE>) { #foreach $line = <FILE> { for ($count = 0; $count < $end; $count++) { s/^(\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+)\s+(.*)/$1 $array[$coun +t] $2/; } print OUT $_; } but the entire array is printed at the substitution point? # input 0.00 1.000 0.00 0.00 1.00 0.00 1.00 0.99 0.99 0.710 0.000 0.22 0.780 0.61 0.39 0.17 0.00 0.50 0.99 0.99 0.530 0.753 # output values for residue 1 0 # input 0.00 1.000 1.00 1.00 0.00 0.00 0.00 0.99 0.99 0.264 0.000 0.22 0.780 0.56 0.33 0.22 0.00 0.56 0.99 0.99 0.555 0.683 # output values for residue 2 0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: replace a column
by Anonymous Monk on Jul 06, 2004 at 15:01 UTC |