1、原题
2、代码
open IN, '<', 'File1.txt' or die 'The file does not exist!'; open OUT, '>', 'File2.txt' or die 'The file does not exist!'; while(<IN>) { chomp; #print("$_ "); @temp = split(/ /,$_); #print("$temp[1] "); $temp_out = "placeInstance $temp[1] $temp[3] $temp[4] $temp[2] -fixed"; print("$temp_out "); print(OUT "$temp_out "); } close IN; close OUT;