Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: using CGI to output a system command

by tlm (Prior)
on Aug 02, 2005 at 14:09 UTC ( [id://480192]=note: print w/replies, xml ) Need Help??


in reply to using CGI to output a system command

Here's enough rope to hang yourself with... :-)

#!/usr/bin/perl -T -- use strict; use warnings; use CGI (); $ENV{ PATH } = join ':', qw( /bin /usr/bin /usr/local/bin ); print CGI::header( 'text/plain' ), `date`; # or # print CGI::header( 'text/plain' ); # system 'date'; __END__

Definitely check out CGI.

Update Added the comment with the system alternative. Thanks, to ikegami for pointing it out.

the lowliest monk

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-03-29 08:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found