http://www.perlmonks.org?node_id=1126291


in reply to Re^2: Does problem is in the for loop???
in thread Does problem is in the for loop???

Update: Ignore this post, see Re^4: Does problem is in the for loop???.

Are you sure this is your code?

print OUT if ((s/m/$uut_names[$i]/) && (s/in1/$nets[$i]/) && (s/output +/$enabled_nets[$i]/));

You say that "it is writing first element alone in XOR_portmap_nets file" but there is no output being written to file here. There are a few issues here, the tutorial Basic debugging checklist mentions three questions which you need to understand: