G
Go Perl
I am having difficulties accessing these values outside this while
loop. I am able to get only the last elements of the array outside.
what should i do to store each of these elements c_array[1],...in an
array and how to access them later ?
while ($c_line=<CONTROL_FILE>) {
chop($c_line);
@c_array = split(/\t/, $c_line);
if ($c_array[4] != "flag" && $c_array[4] == 1) {
$bit_length = blength($c_array[3],$c_array[2]);
$number_Par = $number_Par + 1;
$BIT = $BIT + $bit_length;
printf OUT_CONTROL ("%d\t%d\t%d\t%d\n", $c_array[1], $c_array[2],
$c_array[3], $bit_length);
}
}
loop. I am able to get only the last elements of the array outside.
what should i do to store each of these elements c_array[1],...in an
array and how to access them later ?
while ($c_line=<CONTROL_FILE>) {
chop($c_line);
@c_array = split(/\t/, $c_line);
if ($c_array[4] != "flag" && $c_array[4] == 1) {
$bit_length = blength($c_array[3],$c_array[2]);
$number_Par = $number_Par + 1;
$BIT = $BIT + $bit_length;
printf OUT_CONTROL ("%d\t%d\t%d\t%d\n", $c_array[1], $c_array[2],
$c_array[3], $bit_length);
}
}