The second time you open the file, it needs to be opened for output.
open(INFO1, ">", $file) or die "Couldn't open: $!\n";
It looks like you are using $" correctly so your question should probably be something about reading and writing to files. There are many tutorials on this topic for Perl.
|