Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: System commands using CGI

by aitap (Deacon)
on Dec 03, 2012 at 19:00 UTC ( #1006929=note: print w/ replies, xml ) Need Help??

in reply to System commands using CGI

You are trying to run who with a single argument >>/var/www/cgi-bin/new.txt while STDOUT redirection is done by shell and who does'nt use this argument as you might think (see who). Run system("who >>/var/www/cgi-bin/new.txt"); instead (so shell will catch the >>) or use IPC::Run (it can do redirection by itself).

Sorry if my advice was wrong.

Comment on Re: System commands using CGI
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (17)
As of 2015-11-30 19:01 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (778 votes), past polls