Friday, June 17, 2011

Copy data from one file to another file

This is my first program which Copies data from log.txt file to log1.txt.
Program 1:

open (LOGFILE, "log.txt") or die "I couldn't get at log.txt";
open (ABC,">log1.txt");
for $line(<LOGFILE>)
{

print ABC "$line";
}


output:this program copies all the data from log.txt to log1.txt

No comments:

Post a Comment