CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
executing a cgi

 



cbwery2
Deleted

Oct 22, 2000, 10:53 PM

Post #1 of 2 (1079 views)
executing a cgi Can't Post

HI,

I have linux Red Hat 6.2
I have a cgi that uses the system commands
such as:

system("cp /home/httpd/html/ts/$ce /home/httpd/html/ts/this.mpg");

the variable $ce has a name of a file
contained in /ts

When I execute the cgi from the
server it does not copy the file, but
when I run it like:
#perl chose-video.cgi
it works and it copies the file.

What Can I do?
Does someone Knows What is the problem
and how can I fix this?

Thanks a lot!!


------------------


chrisabrooks
Novice

Nov 12, 2000, 5:06 AM

Post #2 of 2 (1079 views)
Re: executing a cgi [In reply to] Can't Post

Don't use system commands or backticks when you can just use modules!:

use File::Copy;
copy("file1","file2");

------------------
My Little Webring
The Best Of All That Is British
chris.a.brooks@lycos.com

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives