Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: How can I run ?

by bjelli (Pilgrim)
on Mar 24, 2001 at 18:05 UTC ( #66862=note: print w/ replies, xml ) Need Help??


in reply to How can I run ?

What you want to do ("I run a system command with perl by pressing a button on browser") is called a CGI script. You need

  1. a program called a webserver on the machine where the command is to be executed. Example: apache
  2. the perl interpreter installed on the machine where the command is to be executed

when writing the perl script you have to know that:

  1. the script can not take normal input from STDIN, use (the module) CGI instead
  2. the script can write output to stdout, but the first thing you print out has to be "Content-Type: text/plain\n\n" (the line breaks at the end are very important)
  3. there are also some complications with file permissions and users (if we are talking about UNIX here), because the script will be run under the privileges of the webserver, not under your privileges.

I hope that helps in getting you started.

--
Brigitte    'I never met a chocolate I didnt like'    Jellinek
http://www.horus.com/~bjelli/         http://perlwelt.horus.at


Comment on Re: How can I run ?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://66862]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (13)
As of 2014-12-17 20:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (32 votes), past polls