You are asking about arrays of arrays, but I don't even see a simple array in your script example!

A CSV file is a simple text file with each line representing a record, consisting of fields. Assuming that the fields in your data file match the sequence of args in your UDF, you can try the following example. You'll need to download my CSV() UDF and include it in your script.

Note the changes to your UDF include passing an array, using the array values instead of individual fields, Proper output (return 1 on success/0 on failure & proper exit status), and elimination of any output from the UDF.

This is NOT tested, and you should dim the vars in the loop and such.

Glenn

 Code:
If Open(3,'userdata.csv')
  @SERROR ' - while opening userdata.csv')
Else
  $aRecord = CSV(ReadLine(3))  ; read the CSV record, convert to array
  While Not @ERROR
    If CreateUserAccount($aRecord)
      'Failed to create user account' ?
      @SERROR ?
    EndIf
    $aRecord = CSV(ReadLine(3))  
  Loop
  $ = Close(3)
EndIf

Function CreateUserAccount($aUserData)

Dim $aDom, $part, $sDNdom, $LDAPpath, $oContainer, $oUser

Dim $Domain, $ContainerDN, $Account, $FirstName, $MiddleInitial, $LastName, $Description, $Office, $Telephone, $Email, $WebPage, $userPrincipalName
$Domain 	  = $aUserData[0]
$ContainerDN	  = $aUserData[1]
$Account	  = $aUserData[2]
$FirstName	  = $aUserData[3]
$MiddleInitial	  = $aUserData[4]
$LastName	  = $aUserData[5]
$Description	  = $aUserData[6]
$Office		  = $aUserData[7]
$Telephone	  = $aUserData[8]
$Email		  = $aUserData[9]
$WebPage	  = $aUserData[10]
$userPrincipalName= $aUserData[11]




    if VarTypeName($userPrincipalName) = "Empty"
        $userPrincipalName = $Account + "@@" + $Domain
    endif

    $aDom = split($Domain,".")
    for each $part in $aDom
        $sDNdom = "" + $sDNdom + ",dc=" + $part
    next

    $LDAPpath = "LDAP://" + $Domain + "/" + $ContainerDN + $sDNdom
    ;? $LDAPpath

    $oContainer = GetObject($LDAPpath)
    if @error
        ? "GetObject Error: " + @error +  " "  + @Serror
    endif

    $oUser = $oContainer.Create("User", "cn=" + $Account)
    if @error
        ? "Create Error: " + @error +  " "  + @Serror
    endif

    $oUser.Put("sAMAccountName", $Account)
    $oUser.Put("givenName", $FirstName)     ;First Name
    $oUser.Put("Initials", $MiddleInitial)  ;Initials
    $oUser.Put("sn", $LastName)             ;Last Name(Surname)
    $oUser.Put("displayName",$LastName  + iif($LastName, ", ","") +
                             $FirstName + iif($MiddleInitial, " ", "") +
                             $MiddleInitial) ;Display name
    $oUser.Put("description", $Description) ;Description
    $oUser.Put("physicalDeliveryOfficeName",$Office) ;Office
    $oUser.Put("telephoneNumber",$Telephone);Telephone
    $oUser.Put("mail",$Email)               ;E-mail
    $oUser.Put("wWWHomePage",$WebPage)      ;Web page
    $oUser.Put("userPrincipalName", $userPrincipalName) ;userPrincipalName

    $oUser.SetInfo
    $CreateUserAccount = Not @ERROR
    Exit @ERROR

Endfunction
_________________________
Actually I am a Rocket Scientist! \:D