Jun 9, 2017, 12:11 PM
Post #1 of 6
I have a question about reading and exporting a whole txt file to a specific folder. For example, I use the code below, but in the new exported txt files, they all have just one line: GLOB(0x7fb0c...).
How to export a whole txt file into a specified folder
How to copy the content from $simdata to $outfile and export? The reason that I wanted to do this is that I can export the different files to different places or renaming them, as they are over-written in the old directory. Thanks for your help.
open my $simdata, '<', '/theOldPath/file.txt' or die $!;
open my $outfile, ">", "/theNewPath/file.txt" or die $!;
print $outfile "$simdata\n";