script works, but shows error

D

David Bruno

Hi,
I'm using this script to copy one directory into another:

#!/usr/bin/perl
$from = "/full/path/to/source";
$to = "/full/path/to/destination";
`cp -R $from $to`;
print "Done";

The directory gets copied, but the browser diplays a 500 error
instead of "Done". why would this be?

thanks,
David
 
J

Jürgen Exner

David said:
Hi,
I'm using this script to copy one directory into another:

#!/usr/bin/perl
$from = "/full/path/to/source";
$to = "/full/path/to/destination";
`cp -R $from $to`;
print "Done";

The directory gets copied, but the browser diplays a 500 error
instead of "Done". why would this be?

Please see "perldoc -q 500"

jue
 
J

James Willmore

Hi,
I'm using this script to copy one directory into another:

#!/usr/bin/perl
$from = "/full/path/to/source";
$to = "/full/path/to/destination";
`cp -R $from $to`;
print "Done";

The directory gets copied, but the browser diplays a 500 error
instead of "Done". why would this be?

perldoc -q 'cgi'
and
http://www.perl.org/troubleshooting_CGI.html

Read these and if you have any further questions, post them here.

HTH

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
"MacDonald has the gift on compressing the largest amount of
words into the smallest amount of thoughts." -- Winston
Churchill
 
T

Tad McClellan

David Bruno said:
The directory gets copied, but the browser diplays a 500 error
instead of "Done". why would this be?


Because you are not outputting any headers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top