in reply to Re^3: Working with word document
in thread Working with word document
Here is the corrected code
#!/usr/bin/perl use 5.010; use strict; use warnings; open my $fh,'<','file1.doc' or die "can't open file:"; open my $fh2,'>>','file2.doc' or die "can't open file:"; while(<$fh>) { print $fh2 "$_"; } close $fh2 or die "can't close file:"; close $fh or die "can't close file:";
but still the .doc is blank. P.S: I can see the .doc file size is expanding each time I run the program. For Example, when I run for the first time the .doc file size is 13KB. For the second time it is 26KB and it keeps increasing as I run the program.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Working with word document
by 2teez (Vicar) on Aug 27, 2012 at 23:43 UTC | |
by clueless newbie (Curate) on Aug 28, 2012 at 12:09 UTC |