perl running os commands from web

Nathan Bailey Nathan.Bailey at
Sun Nov 17 20:47:44 CST 2002

The best script to start with is "print 'hello world'".  That should
print output on the web page.  If that isn't working, either your
webserver or your CGI environment isn't configured properly.

Having succeeded with that, you probably want to move on to 'ls'.  The
good thing about 'ls' is it will tell you what directory you are in --
which is, most likely, the root directory.  And if your environment is
set up the least bit sanely, you won't be able to write there (e.g.
create 'hello' with touch).  So you want 'cd /tmp; touch hello'
instead, perhaps :-)


More information about the Melbourne-pm mailing list