LISTING 2: Perl's Win32::OLE Syntax


use Win32::OLE;

$strDomain = "Lab";

$oDomain = Win32::OLE->GetObject("WinNT://$strDomain,Domain");

$iMinPWLength = $oDomain->Get(MinPasswordLength); # Method invocation via arrow operator.

$oDomain->{MinPasswordLength} = 3; # Property access via arrow operator using hash syntax.

$oDomain->SetInfo; # Another method call.