On 05/18/00, ""Olivier CLERE" <[EMAIL PROTECTED]>" wrote:
> Here is my Perl code:
> 
> %berval=3D  (
>   bv_len=3D>3,
>   bv_val=3D>"123",
>   );
> 
> $ldapctrl =3D    {
>  ldctl_oid=3D>"2.16.840.1.113730.3.4.2",
>  ldctl_iscritical=3D>1,
>  ldctl_value=3D> %berval,

You'll probably want to change this line to:
ldctl_value={%berval},
or to
ldctl_value=\%berval,
depending on whether or not you to have
all of your lppctrl's referencing the same thing.

>                     };
> 
> I would like to define the Perl equivalent of
> what we would call in C:
> "an array of pointers to the structure ldapctrl",

>  typedef struct berval {

Well, perl doesn't have typedefs, you just create your
datastructures with hashes/arrays/scalars
dynamically any way you want/need to. You
could create a function that puts data into the
some sort of structure, passes back a reference to it,
then pushes that reference into an array, if that's
what you want. Your arrays just grow dynamically
to whatever size they need to, you don't need
to declare them.

see 'perldoc perlref' and 'perldoc perllol'

HTH,
Douglas Wilson

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to