i wrote the following script:
#!perl
my $name;
my $pass;
#print "Please enter a computer on which to create the account...\n";
#$computer = <STDIN>;
print "Please enter the username to be created...\n";
$name = <STDIN>;
print "Please enter the user's password...\n";
$pass = <STDIN>;
print "\n";
#print "$computer";
print "$name";
print "$pass";
use Win32::Lanman;
if(!Win32::Lanman::NetUserAdd("\\\\doomsday", {'name' => \$name,
'password' => \$pass,
'comment' => 'perl test addition'}))
{
print "Sorry, account could not be created...";
print Win32::Lanman::GetLastError();
exit 1;
}
everything prints correctly, and the script gets no errors, however the user that is created is not the username specified in $name. the username is something like SCALAR(0x1a45100)...
is there something i'm doing wrong. i'm new to perl and fairly new to programming so please no flames...
thanks in advance for your help.