Hello friends,
I have encountered a difficulty in understanding the subroutine syntax.
using the following code:
sub build_dyne_file{
open(DYNAP, "+>$veri_dir/$dyna_para") or die $!;
for (keys %hash){
print DYNAP "#define ",$_," ",$hash{$_}->[$i],"\n";
}
close(DYNAP);
}
for (my $i = 0 ; $i <$TEST_QUOTA ; $i++){
build_dyna_file($i);
}
In the 'build dyne file' subroutine, the 'for loop' iterates over the hash keys, while the $i parameter used inside the external 'for loop'.
I hope you understand the problem, If not - I'll try to explain it more properly.
thanks for any answer.