Please use <code> tags around your code. This will preserve your formating and provide your readers with some bells and whistles.
#!D:/Perl/bin/perl.exe
use Win32::AuthenticateUser;
@result = AuthenticateUser("domain", "smith", "abc123");
print @result;
I ran AuthenticateUser() in the debugger to see what it does, and found that it returns the empty string '' (false) if the user is not Authentic, and 1 (true) if they are. I would run your script with the -w flag to get warnings. This way you would know that @result was defined when you print it. My suggested test code for you:
#!D:/Perl/bin/perl.exe -w
use strict; #always.
use Win32::AuthenticateUser;
# My version of Win32::AuthenticateUser did not export the function.
my $result = Win32::AuthenticateUser::AuthenticateUser(
"domain", "smith", "abc123");
print $result ? 'Authentic User' : 'Unknown User or Password';
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.