Use print i"=" a[i] >> ARGV[2]; , failed to append text to the end of text 1.txt,注意第三行是个空行, the 3rd line is a blank line:
print i"=" a[i] >> ARGV[2];
key=56