Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Perl cgi UNIX script query...

  • 30-09-2004 9:04am
    #1
    Posts: 0


    Hey,

    Just a question regarding cgi perl scripts running on Unix systems.

    I have a section of code, which opens a handle on the "w" command on a unix system, the idea being to see who is currently logged on at the moment.
    open(CMD, "w|"); @list = <CMD>; close(CMD); foreach(@list) { print "$_\n"; }
    

    however, this bit of code works from the command line (it prints out the entire command output) but from the browser (when run as a cgi-script), it only shows about 8 lines, where they are far more users on.

    Is there some kind of admin restriction on such a thing?

    Thanks for any help


Comments

  • Registered Users, Registered Users 2 Posts: 3,890 ✭✭✭cgarvey


    That line works fine on a machine here, with 15 users. Wonder if its a buffer thing, and that you should be using something like ...
    while( <CMD> ) { print "$_\n"; }
    
    .. instead?
    .cg


Advertisement