Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am writing a cgi script that allows user's to check thier
disk usage from a web form. I am using the diruse command for windows 2000. I am making the system call
$output = `diruse /m d:\userdirs\username`;
If a run this script from the command line I get something like this in $output:
Size(Mb) Files Directory
50 477 D:\userdirs\username
Which is correct. But If I run the system call from the cgi and print out $output to html the number fields are .08 and 27. What is going on? Any help would be much appreciated.

Replies are listed 'Best First'.
Re: Perl CGI Data Problem
by dooberwah (Pilgrim) on Jul 18, 2002 at 18:05 UTC
    Your problem seems to be from trying to get the Perl script (server side) to execute a client side command. The "diruse" command is being run on the webserver, and isn't giving the results from your client.

    For client side you might want to try ... Javascript?!? (dooberwah ducks)

    -Ben Jacobs

Re: Perl CGI Data Problem
by stajich (Chaplain) on Jul 18, 2002 at 18:03 UTC
    Where does username get set from in your script?
      It Get's set from the form. The user enters there username and that value is stored in $username.