Discovering Servers on the Network

As a good administrator, you should be able to rattle off the names of your network servers without blinking an eye; however, a less fallible way to recall servers on the network would be to use the Win32::NetAdmin::GetServers() or Win32::Lanman::NetServerEnum() function. These functions, if successful, will populate an array with the name of each computer that matches the criteria that you supply.

Win32 platforms refer to computers by using their computer names. A computer name (also known as a NetBIOS or NetBEUI name) is unique to only one computer on a network, can be up to 15 characters in length, and is not case sensitive. Several of the Win32 extensions have functions that either accept or return a computer ...

Get Win32 Perl Programming: The Standard Extensions, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.