Hi there inmates, I've just installed ActivePerl v5.8.7 on an XP machine - eventually!! - and am trying to resolve some DNS names into IP addresses. I've lifted code straight out of one of the books that Dave Roth has written. This code uses Win32::AdminMisc but I can find no trace of this module on CPAN nor is ppm able to locate it. Has this module been deprecated or superseeded or have I just made a pigs ear of things? A test version of the lifted code follows :-
#!perl
use Win32::AdminMisc ;
#
print "\n\tT E S T starts\n" ;
if ($IP = Win32::AdminMisc::GetHostAddress('PC8627') ) {
print "\n\tThe IP Add for PC8627 is $IP\n" ;
}
else
{
print "\n\tUnable to resolve the address!\n" ;
}
print "\n\tT E S T ends\n" ;
The error I get is :-
"Can't locate Win32/AdminMisc.pm in @INC. (@INC contains: C:\Perl\lib C:\Perl\site\lib) at C:\Perl\RC\test.pl line 2. etc
I've done some Perl on UNIX platforms but this is my first foray into the WIn32 world and am quite willing to believe that I've got the wrong end of the stick here. Any suggestions?
2006-10-18 Retitled by Corion, as per Monastery guidelines
Original title: 'Win32::AdminMisc'
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.