in reply to Re: Net View Parsing
in thread Net View Parsing

Thanks! Seems like I'm doing something else wrong becouse even fixing the regexp, with the tip you gave me, I can't get the list of servers.

Replies are listed 'Best First'.
RE: RE: Net View Parsing
by athomason (Curate) on May 24, 2000 at 23:48 UTC
    Well, let's be a bit more diagnostic then. First, what is the format of a line of output from "net view" on your machine? I'm running W2K; you may be seeing different output than I am. Second, try this snippet:
    open (PP, "net view |") || die "$!\n"; print <PP>;
    You should just see the output of 'net view'. If not, try backquotes like I mentioned at the end of my previous post. If that still doesn't work, make sure 'net' is actually in the path as seen by the script. The regexp is pretty generous: all it checks for is two leading backslashes followed by not 'l' or 'w'. Assuming there are computers that match that description, something should get printed. If you're still having troubles, come back with some more details on how it fails.