on Tue, 14 May 2002 16:43:42 GMT, [EMAIL PROTECTED] (Joe Mecklin)
wrote: 

>      ($connect_id = ars_Login($server, $userid, $password)) || die
>      "Can't login:$ars_errstr\n";

If you use 'or' instead of '||' you won't need the silly looking 
outer '()'.
>      (%properties = ars_GetField($connect_id, $schema, 8)) || die
> $ars_errstr;

Here you expect 'ars_GetField' to return a list with an even number 
of elements, which will be coerced into the '%properties' hash.
Are you sure it should be a hash and not a hashref?

>      $r = ${$properties};

There exists no variable '$properties'. If you

        use strict;

you would not be bitten by this.

>      foreach $k (keys %properties)
>      {
>           $val = @{$properties}{"fieldName"};
>           print %$k . ", val = " . $val . "R = " .
> @{$properties}{"owner"} . "\n";
>      }

Basically, if 'ars_GetField' really return a hash, like you showed 
above:

    %properties = ars_GetField($connect_id, $schema, 8)

Then you could access your fields with the following code:

        $properties{fieldname}

and the list of keys would be available as 'keys %properties'.

If, however, 'ars_GetField' would return a hashref, the code would 
have to be

    $properties = ars_GetField($connect_id, $schema, 8)

and you could access your fields with

        $properties->{fieldname}

and the keys would be available as 'keys %{$properties}' 

-- 
felix

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to