Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Perl cgi UNIX script query...

  • 30-09-2004 09:04AM
    #1
    Posts: 431 ✭✭


    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