open (OUT, ">$inputfile.out") or die "cannot open $inputfile.out: $!\n";