in reply to Win32::OLE Word Search and Replace Script Runs Locally but not as part of CGI
The problem is that $doc is not defined, ergo and therfore your file open has failed as this is where it gets defined. If you check LastError it will tell you why it is failing (permissions or path) but you don't. If you do check you will no doubt be able to answer your own question. Do:
my $doc = $word->Documents->Open($oldfile) or die_nice( "Failed to ope +n $oldfie " . $word->LastError() ); ... sub die_nice { print "Content-type: text/html\n\n" . shift }
I don't see why you want to quote "$oldfile" so I have not. I doubt that this is the problem but your are interfacing with Win32 with a virus like language (to quote M$)
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Win32::OLE Word Search and Replace Script Runs Locally but not as part of CGI
by logan (Curate) on Feb 14, 2003 at 18:35 UTC | |
by tachyon (Chancellor) on Feb 14, 2003 at 20:17 UTC |