http://www.perlmonks.org?node_id=1006929


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.