Program No.6.B
Write a Perl script to copy the contents of one file to another file.
Solution:
open(file1,"<source.txt");
open(file2,">destination.txt");
open(file3,">>appendfile.txt");
while(<file1>)
{
print file2 $_;
print $_;
print file3 $_;
}
Write a Perl script to copy the contents of one file to another file.
Solution:
open(file1,"<source.txt");
open(file2,">destination.txt");
open(file3,">>appendfile.txt");
while(<file1>)
{
print file2 $_;
print $_;
print file3 $_;
}
0 comments:
Post a Comment