You can use the tieregistry module as long as the machines are windows and have remote registry capability. Windows ME does not! You also neeed authority for remote access.

Here is a snippit:
use Win32::TieRegistry( Delimiter=>"/" ); my $key; my $computer = "xxx.xxx.xxx.xxx"; my $name; if ($key = $Registry->Open("//$computer/LMachine/SYSTEM/Cu +rrentControlSet/" . "Control/ComputerName/ComputerName/", {Access=>KEY_REA +D}) ) { unless ($name = $key->GetValue("ComputerName")) { print "Could not attach to read ComputerName o +n $computer\n"; } print "Name is $name\n"; } else { print "failed\n"; }

Update:

Guess I should read the question next time. The above will work if you were trying to get a remote host name from an ip address. Where is my coffee!


In reply to Re: Find a networked computer name by Marza
in thread Find a networked computer name by surfmonkey

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.