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:
In reply to Re^3: Does problem is in the for loop???
by marto
in thread Does problem is in the for loop???
by sumathigokul
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |