Copy file by reading one file and save to another file
open INFILEHANDLE, "open OUTFILEHANDLE, ">data.dat"; binmode OUTFILEHANDLE; #Necessary in MS DOS! while (defined($line = )) { print OUTFILEHANDLE unpack('u*', $line); } close INFILEHANDLE; close OUTFILEHANDLE;