bkiahg has asked for the wisdom of the Perl Monks concerning the following question:
Any help is very appreciated.#! C:\perl\bin\perl.exe use strict; use CGI qw(fatalsToBrowser); my $file = "C:\\web\\policies\\folder\\file.doc"; my ($bytesread, $buffer); print "Content-type: text/html\n\n"; open (DOC, $file) or die "cannot open: $!"; my @doc = <DOC>; close DOC; open (NEWDOC, ">C:\\web\\policies\\folder\\deleted\\file.doc") or die +"Cannot open new: $!"; binmode (NEWDOC); while ($bytesread=read(@doc,$buffer,1024)) { print OUTFILE $buffer; } close NEWDOC; print "completed!"; foreach (@doc) {print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Moving .doc Files
by amw1 (Friar) on Jun 23, 2004 at 19:37 UTC | |
by bkiahg (Pilgrim) on Jun 23, 2004 at 19:48 UTC | |
|
Re: Moving .doc Files
by kelan (Deacon) on Jun 23, 2004 at 21:08 UTC | |
by bkiahg (Pilgrim) on Jun 23, 2004 at 23:00 UTC | |
|
Re: Moving .doc Files
by NetWallah (Canon) on Jun 23, 2004 at 19:38 UTC | |
by bkiahg (Pilgrim) on Jun 23, 2004 at 19:49 UTC | |
|
Re: Moving .doc Files
by gawatkins (Monsignor) on Jun 23, 2004 at 20:42 UTC | |
|
Re: Moving .doc Files
by ercparker (Hermit) on Jun 26, 2004 at 17:00 UTC |